Page 1 of 1

Crash when connecting to daemon

Posted: Fri Feb 21, 2020 1:13 am
by Mwoua
I've just migrated to version 2.0.3 thanks to the installer in the other post. Everything was working fine, so I removed deluge 1.3.15, but now the UI crash as soon as I connect to my running daemon.

I've tried to run
deluge-debug.exe -L error
but it doesnt log anything.

The only thing I'm seeing is ModuleNotFoundError: No module named '_curses' when running deluge-console.exe

It looks like the daemon is still running properly

The entire error log from deluge-console is:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files\Deluge\lib\", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\Deluge\lib\", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Deluge\deluge-console.exe\", line 9, in <module>
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\console\", line 19, in start
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\console\", line 154, in start
    from deluge.ui.console.main import ConsoleUI  # import here because (see top)
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\console\", line 31, in <module>
    from deluge.ui.console.modes.preferences import Preferences
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\console\modes\preferences\", line 3, in <module>
    from deluge.ui.console.modes.preferences.preferences import Preferences
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\console\modes\preferences\", line 33, in <module>
    from deluge.ui.console.widgets.sidebar import Sidebar
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\console\widgets\", line 12, in <module>
    import curses
  File "C:\Program Files\Deluge\lib\curses\", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

Should I just reinstall deluge 2?

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 1:46 am
by mhertz
I'd try uninstall everything deluge(deluge2 now), and install deluge2 again. The installer supports direct upgrades, but not really from deluge1, though shouldn't cause your issue, but just in case. Stop all daemons first.

Unfortunetly, I've heard this once before so seems a deluge2 bug unfortunetly which I have no idea how to fix sadly. If happens again, try running regular deluge.exe with debug switch and add -l PATHTOLOGFILE. Last time, the log was either empty though, or just had nothing useful I believe. You will then need submit bugticket, hopefully with logs. Remember deluge2 only supports deluge2 daemons.

You could also try the dev installer deluge-2.0.4.dev23 , just in case.

I'd try without any torrents, in a clean profile, so e.g rename config-folder to have a -bak ending, and see if same there. Delete/rename-back afterwards, as was just for testing. I can't remember if was the same as I previously referenced, but one user could connect fine but as soon as adding torrent, e.g Linux ISO, then instant crash. No log-entries there neither.

I don't know how consoleUI worked in deluge1 on windows, but you need add switches to not get that error, as run standalone on *nix needs curses. Many switches work I tested, but a few don't, e.g with regards to preferences I believe. I haven't submitted bugreports of this, because don't know if deluge1 could set prefs etc(on windows I mean), and was too lazy to test :) Also, the consoleui is completely rewritten in deluge2, mimicking GTKUI, just in curses instead of GTK3, and by I believe a linux user, so isn't really comparable to deluge1 anymore neither, and probably misses a few win32 conditional checkings presumably. (Meanwhile just edit core.conf directly instead)

Otherwise, I'm affraid you'd need revert to deluge1, sorry. Good luck.

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 4:32 am
by Mwoua
Well, its something in my config folder. With a clean one it works.

Gonna try to find what causes the issue. If I cant I'll just reconfigure everything from scratch

EDIT: adding a torrent cause it to crash instantly

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 4:50 am
by mhertz
Crap, sorry to hear that. I just went back and found the previous report about this, and the exact same as you described happened there. He had two different PCs with same installer installed on both and when connecting to same daemon on gentoo box and adding a torrent, then the one PC had the GTKUI crashing and the other worked fine. Debug logging showed nothing either unfortunetly.

I'm sorry but have no idea of the reasoning and you need post bugticket if wanting it properly looked at, though very hard to troubleshoot without logs and when not being able to reproduce unfortunetly.

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 5:05 am
by Mwoua
I guess ill revert back to 1.3.15.

The web UI is working properly though, its just the client

The weird thing is that it was working when I had both deluge 1.3.15 and 2.0.3 installed (in different location)

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 5:20 am
by mhertz
Hmm that is weird indeed, no idea why, but you can if wanted have both installed and just use the new, if wanted. They should be separate, as one is 32bit app and is in x86 programfiles folder, and I changed the unofficial deluge2 installer to use regular programfiles now as x64 app and to use x64 uninstall reg-entries instead of syswow64 etc, but they should be able to coexist both.

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 5:36 am
by Mwoua
I've tried to go back to the state where it worked, without success.
So im back to deluge 1.3.15, but I've losta large part of my config, I didnt backup my config folder before upgrading

Re: Crash when connecting to daemon

Posted: Fri Feb 21, 2020 7:56 am
by mhertz
Sorry for your troubles.

I can't remember fully, but I believe when having a config folder for deluge1 and then running deluge2 then I believe there were by deluge made a zip file in that profile folder named or alike, and i'd guess it has some backups of old system, which you possibly can unzip and use/replace.

Other than that then deluge2 rewrites your core.conf config-file in new format on first run so when going back to deluge1 then it can probably not understand it, but I could be wrong about that + you maybe have a bak core.conf in profile folder still in old format possibly.

Also if having used libtorrent 1.2.x with deluge2(default), then when going back to deluge1 you need force-recheck all your torrents and they should work again.

Re: Crash when connecting to daemon

Posted: Mon Feb 24, 2020 12:54 am
by Mwoua
Yeah, forced recheck worked. But now i'm not downloading anything (upload work though) gotta check whats wrong

Re: Crash when connecting to daemon

Posted: Mon Mar 02, 2020 6:33 am
by pjlbyrne
This affects me too, I haven't found a resolution yet.