deluge-FileBotTool icon indicating copy to clipboard operation
deluge-FileBotTool copied to clipboard

FileBotTool not activateable in plugin screen

Open geldofa opened this issue 1 year ago • 7 comments

Hi,

I have been trying to get the FileBottool to work with Deluge 2.1.1 but can't seem to get it right.

Tried a normal plugin install, manually putting it in the folder, distilling the 2.0 & 2.0.2 versions in py3.8 & py3.9, editing core.conf but with no success.

Is there something als i could try? Think i have exhausted the available info on this online.

Deluge: 2.1.1 Filebot: 4.9.6 OS: Windows 10

Thx in advance for the replies

geldofa avatar Jul 18 '22 17:07 geldofa

Can you check and make sure that the .egg filename ends with the same python version that your deluge runs? (you can get this info on the about page in deluge.)

For example if deluge is running on python 3.8, make sure that the .egg filename is FileBotTool-2.0.2-py3.8.egg.

Also it's always a good idea to double check the file permissions. Make sure that the user deluge is running as has full read/execute access to the plugins folder and the .egg file.

Laharah avatar Jul 21 '22 10:07 Laharah

Hey Laharah, thx for your reply!

AppData\Roaming plugin folder: i can activate py3.8 eggs which work without a problem. Program Files plugin folder: py3.9 eggs for the standard plugins.

I also tried a clean reinstall (I upgraded previously) and as first order installing FileBotTool with no success. Could there we a conflict with me having 2 versions of python installed on my system? (I was able to distil py3.8 & py3.9 eggs)

As for permission, if i look at access my account has the same permissions as an administrator

Sidenote: Thanks for this wonderfull tool, i am already using it for a couple of years now and i really love what you have made.

geldofa avatar Jul 21 '22 23:07 geldofa

It sounds like your deluge is running on python 3.8, if you go into the plugin folder and rename the plugin to FileBotTool-2.0.2-py3.8.egg it may work, at least it has for people in the past.

Laharah avatar Jul 22 '22 02:07 Laharah

it this very moment i have it in my plugin folder but i can not activate the toggle.

geldofa avatar Jul 25 '22 21:07 geldofa

Hmm, any way you can get some debug logs to me? I'm not sure what else could be causing it.

Laharah avatar Jul 25 '22 23:07 Laharah

I'm having an issue that may be identical to this; Deluge 2.1.1, FileBot 4.9.6, Win10, plugin is displayed in the list but fails to activate.

These are the logs I'm getting when I click to activate the plugin:

16:33:39 [ERROR   ][deluge.pluginmanagerbase          :72  ] Unable to instantiate plugin 'FileBotTool' from 'c:\\users\\noget\\appdata\\roaming\\deluge\\plugins\\filebottool-2.0.2-py3.9.egg'!
16:33:39 [ERROR   ][deluge.pluginmanagerbase          :72  ] No module named 'winprocess'
Traceback (most recent call last):
  File "deluge\pluginmanagerbase.py", line 148, in enable_plugin
  File "c:\users\noget\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\__init__.py", line 47, in __init__
    from .core import Core as _plugin_cls
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\noget\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\core.py", line 57, in <module>
    from . import pyfilebot
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\noget\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\pyfilebot.py", line 19, in <module>
    from . import killableprocess
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\noget\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\killableprocess.py", line 69, in <module>
    import winprocess
ModuleNotFoundError: No module named 'winprocess'

Unless I've screwed something up with my python install it seems to be some kind of module import issue?

fatlewis avatar Sep 09 '22 15:09 fatlewis

@fatlewis, that's weird. There is a winprocess module included in the .egg file.

If you're able to, you can try changing line 69 in killableprocess.py to from . import winprocess. If you then follow the build instructions on the readme, you can see if the new .egg file works.

Laharah avatar Sep 10 '22 01:09 Laharah

I have the same issue when trying to add plugin to deluge 2.0.3 — it simply doesn't add.

Tried on Ubuntu 20.04 (with python 3.8) and on Ubuntu 22.04 (with python 3.10). Was renaming the .egg file like suggested. No luck.

Any ideas? Should I try building it from source?

GentleHoneyLover avatar Oct 11 '22 20:10 GentleHoneyLover

@GentleHoneyLover If you can get me logs of when you try to add and enable FileBotTool I can get a better idea of what's going on. I don't think it's the same problem as @fatlewis, because his codepath is only activated on windows.

Laharah avatar Oct 12 '22 20:10 Laharah

@Laharah, unfortunately, deluge doesn't write anything in the log when I attempt to add the plugin for some reason.

I even tried compiling it (following your instructions) — which seems to have been successful. But my deluge still doesn't want to take this newly compiled .egg file.

After I attempt to add the plugin, the following zip file appears in the plugins folder of deluge's config folder: [object FileList] (no extension). The contents of this zip file is the following:

.
├── EGG-INFO
│   ├── dependency_links.txt
│   ├── entry_points.txt
│   ├── not-zip-safe
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   └── top_level.txt
└── filebottool
    ├── __init__.py
    ├── __pycache__
    │   ├── __init__.cpython-310.pyc
    │   ├── auto_sort.cpython-310.pyc
    │   ├── common.cpython-310.pyc
    │   ├── core.cpython-310.pyc
    │   ├── events.cpython-310.pyc
    │   ├── killableprocess.cpython-310.pyc
    │   ├── pyfilebot.cpython-310.pyc
    │   ├── six.cpython-310.pyc
    │   ├── winprocess.cpython-310.pyc
    │   └── wintypes.cpython-310.pyc
    ├── auto_sort.py
    ├── common.py
    ├── core.py
    ├── data
    │   ├── config.glade
    │   ├── config.ui
    │   ├── fb_icon16.png
    │   ├── fb_icon24.png
    │   ├── handler_editor.glade
    │   ├── handler_editor.ui
    │   ├── rename.glade
    │   └── rename.ui
    ├── events.py
    ├── gtkui
    │   ├── __init__.py
    │   ├── __pycache__
    │   │   ├── __init__.cpython-310.pyc
    │   │   ├── common.cpython-310.pyc
    │   │   ├── common_gtk3.cpython-310.pyc
    │   │   ├── config_ui.cpython-310.pyc
    │   │   ├── config_ui_gtk3.cpython-310.pyc
    │   │   ├── gtk3ui.cpython-310.pyc
    │   │   ├── gtkui.cpython-310.pyc
    │   │   ├── handler_editor.cpython-310.pyc
    │   │   ├── handler_editor_gtk3.cpython-310.pyc
    │   │   ├── handler_ui.cpython-310.pyc
    │   │   ├── handler_ui_gtk3.cpython-310.pyc
    │   │   ├── rename_dialog.cpython-310.pyc
    │   │   ├── rename_dialog_gtk3.cpython-310.pyc
    │   │   ├── user_messenger.cpython-310.pyc
    │   │   └── user_messenger_gtk3.cpython-310.pyc
    │   ├── common.py
    │   ├── common_gtk3.py
    │   ├── config_ui.py
    │   ├── config_ui_gtk3.py
    │   ├── gtk3ui.py
    │   ├── gtkui.py
    │   ├── handler_editor.py
    │   ├── handler_editor_gtk3.py
    │   ├── handler_ui.py
    │   ├── handler_ui_gtk3.py
    │   ├── rename_dialog.py
    │   ├── rename_dialog_gtk3.py
    │   ├── user_messenger.py
    │   └── user_messenger_gtk3.py
    ├── killableprocess.py
    ├── pyfilebot.py
    ├── six.py
    ├── winprocess.py
    └── wintypes.py

I'm running deluge 1.3 and filebot 4.9.6 in a container (here's my image: link). I have multiple plugins installed (including filebot plugin) and everything is working flawlessly. Now, I'm upgrading the image base from ubuntu 18.04 to ubuntu 22.04, which automatically gives me deluge 2.0.3. I'm running this new test container in Docker Desktop on my M1 Mac. Maybe there's something in my image that's causing the problem with plugin installation. I will try another image and report back.

GentleHoneyLover avatar Oct 15 '22 09:10 GentleHoneyLover

@Laharah, ok, I just tested on the linuxserver.io image and the behavior is identical to my container (python version matches in both cases — 3.10.8. Nothing gets written in the log. The same archive file appears in the plugins folder.

GentleHoneyLover avatar Oct 15 '22 10:10 GentleHoneyLover

If it can be replicated on the linuxserver.io image I should be able to take a closer look and do some debugging. I'll see what I can figure out.

Laharah avatar Oct 15 '22 18:10 Laharah

@GentleHoneyLover, how did you get filebot installed on the linuxserver.io image? I don't think it comes with java, what steps did you do to install it?

I did get the image running and I did add filebottool to deluge by placing it into the plugins folder. I had to change to filename to FileBotTool-2.0.2-py3.10.egg, but once I did that I started seeing filebottool errors in deluge about not being able to find a filebot install.

Laharah avatar Oct 15 '22 20:10 Laharah

@fatlewis, that's weird. There is a winprocess module included in the .egg file.

If you're able to, you can try changing line 69 in killableprocess.py to from . import winprocess. If you then follow the build instructions on the readme, you can see if the new .egg file works.

My error is the same, Deluge 2.1.1 on Windows 10 with Python 3.9:

15:34:30 [ERROR   ][deluge.pluginmanagerbase          :72  ] Unable to instantiate plugin 'FileBotTool' from 'c:\\users\\miyura\\appdata\\roaming\\deluge\\plugins\\filebottool-2.0.2-py3.9.egg'!
15:34:30 [ERROR   ][deluge.pluginmanagerbase          :72  ] No module named 'winprocess'
Traceback (most recent call last):
  File "deluge\pluginmanagerbase.py", line 148, in enable_plugin
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\__init__.py", line 47, in __init__
    from .core import Core as _plugin_cls
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\core.py", line 57, in <module>
    from . import pyfilebot
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\pyfilebot.py", line 19, in <module>
    from . import killableprocess
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.2-py3.9.egg\filebottool\killableprocess.py", line 69, in <module>
    import winprocess
ModuleNotFoundError: No module named 'winprocess'

And if I do what you suggested (and also bump to 2.0.3): image

15:45:03 [ERROR   ][deluge.pluginmanagerbase          :72  ] Unable to instantiate plugin 'FileBotTool' from 'c:\\users\\miyura\\appdata\\roaming\\deluge\\plugins\\filebottool-2.0.3-py3.9.egg'!
15:45:03 [ERROR   ][deluge.pluginmanagerbase          :72  ] No module named 'wintypes'
Traceback (most recent call last):
  File "deluge\pluginmanagerbase.py", line 148, in enable_plugin
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\__init__.py", line 47, in __init__
    from .core import Core as _plugin_cls
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\core.py", line 57, in <module>
    from . import pyfilebot
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\pyfilebot.py", line 19, in <module>
    from . import killableprocess
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\killableprocess.py", line 69, in <module>
    from . import winprocess
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\winprocess.py", line 27, in <module>
    from wintypes import BOOL, BYTE, DWORD, HANDLE, LPCWSTR, LPWSTR, UINT, WORD
ModuleNotFoundError: No module named 'wintypes'

Doing the same with wintypes just threw a whole new error: image

15:48:32 [ERROR   ][deluge.pluginmanagerbase          :72  ] Error -5 while decompressing data: incomplete or truncated stream
Traceback (most recent call last):
  File "deluge\pluginmanagerbase.py", line 148, in enable_plugin
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\__init__.py", line 47, in __init__
    from .core import Core as _plugin_cls
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\core.py", line 57, in <module>
    from . import pyfilebot
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\pyfilebot.py", line 19, in <module>
    from . import killableprocess
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "c:\users\miyura\appdata\roaming\deluge\plugins\filebottool-2.0.3-py3.9.egg\filebottool\killableprocess.py", line 69, in <module>
    from . import winprocess
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 925, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1423, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1397, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1378, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 423, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 716, in spec_from_file_location
  File "<frozen zipimport>", line 191, in get_filename
  File "<frozen zipimport>", line 709, in _get_module_code
  File "<frozen zipimport>", line 571, in _get_data
zlib.error: Error -5 while decompressing data: incomplete or truncated stream

Soitora avatar Dec 29 '22 14:12 Soitora

I have the same problem, I can't activate the plugin (python version matches the name)

viseniv avatar Jan 22 '23 12:01 viseniv

I was able to finally re-create and (hopefully) fix this bug on a fresh windows VM. The new release 2.0.3 should fix this issue. If someone here can confirm or send logs of new errors I can either close this issue or do some more bug hunting.

Laharah avatar Jan 30 '23 18:01 Laharah

I was able to finally re-create and (hopefully) fix this bug on a fresh windows VM. The new release 2.0.3 should fix this issue. If someone here can confirm or send logs of new errors I can either close this issue or do some more bug hunting.

I had this issue in my watchlist and I was waiting for a fix, with the previous version whenever I tried to enable FileBotTool it would instantly disable again.

With this new release 2.0.3 - When I enabled it it stayed enabled, a CMD popup showed up, and the FileBotTool menu item is there 😄 - So I can confirm it appears to be working again.

I still have to re-add my sorting rules and see if it actually functions as well, but so far, so good. Thanks for the fix!

RonSijm avatar Feb 01 '23 18:02 RonSijm

Seems to be working for me as well with 2.0.3

Soitora avatar Feb 03 '23 22:02 Soitora

@Soitora, @RonSijm, Great! Sorry this issue persisted for so long. Gonna call this closed. Feel free to re-open or open a new issue if something else comes up.

Laharah avatar Feb 04 '23 18:02 Laharah