-
Notifications
You must be signed in to change notification settings - Fork 481
Crash on injecting an entry #1545
Copy link
Copy link
Closed
Description
Expected behaviour:
It should execute a task with injected entry data.
Actual behaviour:
It crashes on any plugin which requests rendering of entry fields, initially noticed on exists_series and telegram plugins in working config. It doesn't crash if I use execute CLI command with mock plugin added to the config as input.
Steps to reproduce:
Inject an entry using CLI:
flexget --test inject FooBar --tasks TEST --dump
Config:
tasks:
TEST:
# mock:
# - {title: FooBar}
accept_all: yes
exec: echo "Eureka!"
Log:
(Flexget) D:\devel\projects\flexget\Flexget>flexget --test inject FooBar --tasks TEST --dump
2016-12-10 18:00 INFO manager Test mode, creating a copy from database ...
2016-12-10 18:00 INFO manager Test database created
2016-12-10 18:00 VERBOSE task_queue There are 1 tasks to execute. Shutdown will commence when they have completed.
2016-12-10 18:00 INFO task TEST Plugin exec is not executed because input phase is disabled (e.g. --test)
2016-12-10 18:00 VERBOSE task TEST ACCEPTED: `FooBar` by accept_all plugin
2016-12-10 18:00 VERBOSE details TEST Summary - Accepted: 1 (Rejected: 0 Undecided: 0 Failed: 0)
2016-12-10 18:00 CRITICAL task TEST BUG: Unhandled error in plugin exec: 'NoneType' object has no attribute 'name'
2016-12-10 18:00 CRITICAL manager TEST An unexpected crash has occurred. Writing crash report to D:\devel\projects\flexget\Flexget\crash_report.2016.12.10.180036111000.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.8.2.dev
2016-12-10 18:00 WARNING task TEST Aborting task (plugin: exec)
2016-12-10 18:00 WARNING backlog TEST No input snapshot available for `FooBar`, using current state
2016-12-10 18:00 INFO manager Removed test database
Additional information:
- Flexget Version: 2.8.2.dev / 2.8.1
- Python Version: 2.7.10 / 3.5.2
- Installation method: Scripts/pip install -e . / pip3 install flexget
- OS and version: Windows 8.1 / Linux QNAP253 3.12.6 Request to pull Rotten Tomatoes plugin changes #1 SMP Wed Nov 2 04:23:31 CST 2016 x86_64 unknown
- Link to crash log:
2016-12-10 18:00 DEBUG manager Figuring out config load paths
2016-12-10 18:00 DEBUG manager Adding virtualenv path
2016-12-10 18:00 DEBUG manager Found config: D:\devel\projects\flexget\Flexget\config.yml
2016-12-10 18:00 DEBUG manager Config file D:\devel\projects\flexget\Flexget\config.yml selected
2016-12-10 18:00 INFO manager Test mode, creating a copy from database ...
2016-12-10 18:00 INFO manager Test database created
2016-12-10 18:00 VERBOSE task_queue There are 1 tasks to execute. Shutdown will commence when they have completed.
2016-12-10 18:00 INFO task TEST Plugin exec is not executed because input phase is disabled (e.g. --test)
2016-12-10 18:00 VERBOSE task TEST ACCEPTED: `FooBar` by accept_all plugin
2016-12-10 18:00 VERBOSE details TEST Summary - Accepted: 1 (Rejected: 0 Undecided: 0 Failed: 0)
2016-12-10 18:00 CRITICAL task TEST BUG: Unhandled error in plugin exec: 'NoneType' object has no attribute 'name'
Traceback (most recent call last):
File "d:\devel\projects\flexget\flexget\flexget\task.py", line 483, in __run_plugin
return method(*args, **kwargs)
File "d:\devel\projects\flexget\flexget\flexget\event.py", line 23, in __call__
return self.func(*args, **kwargs)
File "d:\devel\projects\flexget\flexget\flexget\plugins\output\exec.py", line 194, in phase_handler
self.execute(task, 'on_' + phase, config)
File "d:\devel\projects\flexget\flexget\flexget\plugins\output\exec.py", line 142, in execute
cmd = render_from_entry(cmd, entrydict)
File "d:\devel\projects\flexget\flexget\flexget\utils\template.py", line 221, in render_from_entry
variables['task_name'] = entry.task.name
AttributeError: 'NoneType' object has no attribute 'name'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels