Skip to content

Unicode error in Deamon mode #2031

Description

@spiderbit

Expected behaviour:

The deamon mode runs as systemd service without errors

Actual behaviour:

Throws UnicodeDecodeError over and over again and produces very useless kodi_crash reports

Steps to reproduce:

  • Step 1: Start kodi in deamon mode.

Config:

paste FULL config and remove any personal info
use paste service like http://dpaste.de or http://pastebin.com if config is too long

Log:

2017-12-03 18:34 CRITICAL task_queue                    BUG: Unhandled exception during task queue run loop.
2017-12-03 18:34 CRITICAL manager                       An unexpected crash has occurred. Writing crash report to /home/black/crash_report.2017.12.03.183420715929.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.10.82

Traceback (most recent call last):
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/task_queue.py", line 48, in run
    self.current_task.execute()
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/task.py", line 70, in wrapper
    return func(self, *args, **kw)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/task.py", line 642, in execute
    fire_event('task.execute.started', self)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/event.py", line 106, in fire_event
    result = event(*args, **kwargs)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/utils/simple_persistence.py", line 195, in load_task
    SimplePersistence.load(task.name)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/utils/simple_persistence.py", line 145, in load
    cls.class_store[task][skv.plugin][skv.key] = skv.value
  File "/nix/store/ghzd3cxj7ysdszy7r0gdngvyvjn18lmx-python2.7-SQLAlchemy-1.1.13/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 293, in __get__
    return self.descriptor.__get__(instance, owner)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/utils/database.py", line 139, in getter
    return json.loads(getattr(self, name), decode_datetime=True)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/utils/json.py", line 112, in loads
    return json.loads(*args, **kwargs)
  File "/nix/store/779afy6nqwpwav76r92djbk652f0d3g0-python-2.7.14/lib/python2.7/json/__init__.py", line 352, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/utils/json.py", line 48, in decode
    return super(DTDecoder, self).decode(obj, **kwargs)
  File "/nix/store/779afy6nqwpwav76r92djbk652f0d3g0-python-2.7.14/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

Additional information:

  • FlexGet version: 2.10.111 or 2.10.82 (the error looks the same for both versions)
  • Python version: 2.7.14
  • Installation method: nixos installer
  • Using daemon (yes/no): yes
  • OS and version: nixos 17.09
  • Link to crash log:

When I start it without deamon mode it seems to work, is there a way to disable logging in deamon mode, I suspect taht the unicode error somehow happens because of the logging.

Activity

  1. liiight commented on Dec 4, 2017

    @liiight
    Member

    Try flexget database reset-plugin simple_persistence and run again

  2. spiderbit commented on Dec 4, 2017

    @spiderbit
    Author

    Didnt help really

    Output of systemctl status flexget -l:

    Dec 04 15:32:56 mars flexget[3018]: self.buffer += text
    Dec 04 15:32:56 mars flexget[3018]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 82: ordinal not in range(128)
    Dec 04 15:32:56 mars flexget[3018]: Logged from file logger.py, line 133
    Dec 04 15:32:56 mars flexget[3018]: Traceback (most recent call last):
    Dec 04 15:32:56 mars flexget[3018]: File "/nix/store/779afy6nqwpwav76r92djbk652f0d3g0-python-2.7.14/lib/python2.7/logging/init.py", line 884, in emit
    Dec 04 15:32:56 mars flexget[3018]: stream.write(fs % msg.encode("UTF-8"))
    Dec 04 15:32:56 mars flexget[3018]: File "/nix/store/70bywj539bcp3b3p1776s0f1ri7x7w56-FlexGet-2.10.111/lib/python2.7/site-packages/flexget/ipc.py", line 44, in write
    Dec 04 15:32:56 mars flexget[3018]: self.buffer += text
    Dec 04 15:32:56 mars flexget[3018]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 93: ordinal not in range(128)
    Dec 04 15:32:56 mars flexget[3018]: Logged from file logger.py, line 133

  3. added a commit that references this issue on Oct 3, 2018
    da7b026
  4. added a commit that references this issue on Oct 6, 2018
    1c444a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions