cpoppema / docker-flexget

An auto updating FlexGet container.
82 stars 39 forks source link

decoding str is not supported #57

Closed dthunder746 closed 5 years ago

dthunder746 commented 5 years ago

Hi, one of the lastest commits has caused an issue. Last download with no problems was the 9th of Nov. I'm using the latest image.

2019-11-11 20:41 CRITICAL task          series-bb       BUG: Unhandled error in plugin transmission: decoding str is not supported
2019-11-11 20:41 CRITICAL manager       series-bb       An unexpected crash has occurred. Writing crash report to /root/.flexget/crash_report.2019.11.11.204106774024.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 3.0.0
2019-11-11 20:41 WARNING  task          series-bb       Aborting task (plugin: transmission)
cpoppema commented 5 years ago

Hello @dthunder746, thanks for posting your log. I will have to investigate, but it is probably related to version 3.0.0 which has been released only a couple of hours ago: https://github.com/Flexget/Flexget/releases.

cpoppema commented 5 years ago

I have good hope this will be fixed by https://github.com/Flexget/Flexget/commit/5ada07a722adf8229f94fc64c4fbb5f695be8e97.

There is no bugfix release yet, so you would have to wait until they publish one or you can apply the linked patch by yourself, the file to patch can be found inside the container at /usr/lib/python3.7/site-packages/flexget/plugins/clients/transmission.py.

$ docker exec -it flexget bash
root@5a818c7e60a3:/# cd /usr/lib/python3.7/site-packages/flexget/plugins/clients/
root@5a818c7e60a3:/usr/lib/python3.7/site-packages/flexget/plugins/clients# git apply <HIT ENTER>
<PASTE THE FOLLOWING:>
--- transmission.py
+++ transmission.py
@@ -678,7 +678,7 @@
             else:
                 # Transmission doesn't like it when paths end in a separator
                 path = path.rstrip('\\/')
-                add['download_dir'] = str(pathscrub(path), 'utf-8')
+                add['download_dir'] = pathscrub(path)
         # make sure we add it paused, will modify status after adding
         add['paused'] = True

<HIT ENTER>
<HIT CTRL+D>

Now you can restart your container and this hopefully fixes it :smile:. If you can patch it yourself and it doesn't actually work, let me know and I will see about creating a new release that supports version pinning so you can pin it to 2.21.35 or something close to that.

dthunder746 commented 5 years ago

Thanks for the quick reply! I'll give this a shot when I get home and let you know how it goes.

cpoppema commented 5 years ago

In the meantime, version 3.0.1 has been released as well that includes the abovementioned patch. Let me know if the issue persists.