Skip to content

LoggingThread fails on Python 3 #66

@alexandrevicenzi

Description

@alexandrevicenzi

LoggingThread fails on Python 3 due to encoding errors.

It fails on Python 3 because string.encode returns a bytes-like object and StringIO should receive an str object.

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/kobo/kobo/worker/logger.py", line 54, in run
    self._hub.upload_task_log(StringIO(self._send_data), self._task_id, "stdout.log", append=True)
TypeError: initial_value must be str or None, not bytes

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