Skip to content

Unicode issues with exec plugin #1295

@regystro

Description

@regystro

Same as #1269, but with exec plugin

It was working well recently, but now if the given path contains unicode (e. g. "ñ") characters it crashes.

Running flexget version 2.1.23 installed using pip, on Windows 8.1 x64 + Python 2.7.12

Relevant snippet of crash report (crash_report.2016.07.25.115814396000.log):

2016-07-25 11:58 CRITICAL task          remove-folders  BUG: Unhandled error in plugin exec: 'ascii' codec can't encode character u'\xf1' in position 124: ordinal not in range(128)
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\flexget\task.py", line 444, in __run_plugin
    return method(*args, **kwargs)
  File "c:\python27\lib\site-packages\flexget\event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "c:\python27\lib\site-packages\flexget\plugins\output\exec.py", line 192, in phase_handler
    self.execute(task, 'on_' + phase, config)
  File "c:\python27\lib\site-packages\flexget\plugins\output\exec.py", line 163, in execute
    if (self.execute_cmd(cmd, allow_background, config['encoding']) != 0 and
  File "c:\python27\lib\site-packages\flexget\plugins\output\exec.py", line 109, in execute_cmd
    stderr=subprocess.STDOUT, close_fds=False)
  File "c:\python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "c:\python27\lib\subprocess.py", line 929, in _execute_child
    args = '{} /c "{}"'.format (comspec, args)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 124: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions