Skip to content

AttributeError: cannot access 'encode' with accented characters #1553

Description

@antivirtel

Expected behaviour:

Show series info

Actual behaviour

$ flexget series show "Aranyélet"
There is a FlexGet process already running for this config, sending execution there.
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/flexget/__init__.py", line 42, in main
    manager.start()
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 309, in start
    client.handle_cli(self.args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
AttributeError: cannot access 'encode'

========= Remote Traceback (3) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 535, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 90, in exposed_handle_cli
    self.manager.handle_cli(options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/manager.py", line 353, in handle_cli
    options.cli_command_callback(self, command_options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/series.py", line 37, in do_cli
    display_details(options)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/cli/series.py", line 188, in display_details
    console(colorize(ERROR_COLOR, 'ERROR: Unknown series `%s`' % name))
  File "/usr/local/lib/python2.7/dist-packages/flexget/terminal.py", line 263, in console
    print(text, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 51, in write
    self.flush()
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 57, in flush
    self.writer(self.buffer, end='')
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
AttributeError: cannot access 'encode'

========= Remote Traceback (2) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 535, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/flexget/ipc.py", line 117, in exposed_console
    console(text, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/terminal.py", line 265, in console
    text = text.encode(io_encoding, 'replace').decode(io_encoding)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 150, in __getattr__
    return syncreq(self, consts.HANDLE_GETATTR, name)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
    raise obj
AttributeError: cannot access 'encode'

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 541, in _handle_getattr
    return self._access_attr(oid, name, (), "_rpyc_getattr", "allow_getattr", getattr)
  File "/usr/local/lib/python2.7/dist-packages/rpyc/core/protocol.py", line 504, in _access_attr
    raise AttributeError("cannot access %r" % (name,))
AttributeError: cannot access 'encode'

Steps to reproduce:

  • Step 1: have a series entry with some special character like: é á
  • Step 2: try to ask info about that

Config:

series:
[...]
  - Aranyélet

Log:

see above

Additional information:

  • Flexget Version: 2.8.1
  • Python Version: 2.7.9
  • Installation method: pip
  • OS and version: Raspian 8

Activity

  1. self-assigned this
    on Dec 12, 2016
  2. liiight commented on Dec 22, 2016

    @liiight
    Member

    Related #1558 ?

  3. antivirtel commented on Dec 22, 2016

    @antivirtel
    ContributorAuthor

    It might be, but I don't see the config there.

  4. liiight commented on Dec 22, 2016

    @liiight
    Member

    This is what I used to test:

      series_Aranyélet:
        mock:
          - {title: Aranyélet.S01E01.720p.x264-FlexGet}
        series:
          - Aranyélet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions