You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
(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
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'
Changing flexget\utils\template.py:216 to if hasattr(entry, 'task') and entry.task is not None: seems fixed it for me, but it resulted in task_name is not being set anymore. I guess the problem is that entry.task somehow appears to be None at the moment of rendering, but why?
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_seriesandtelegramplugins in working config. It doesn't crash if I useexecuteCLI command with mock plugin added to the config as input.Steps to reproduce:
Inject an entry using CLI:
flexget --test inject FooBar --tasks TEST --dumpConfig:
Log:
Additional information: