Opened 13 months ago

Last modified 9 months ago

#3546 new bug

Deluge-console fails on windows.

Reported by: mhertz Owned by:
Priority: minor Milestone: needs verified
Component: Console UI Version: develop
Keywords: Cc:


As title, deluge-console fails running on windows when used from installer(works unfreezed though). It happened after the pyinstaller spec file was rewritten/simplified.

C:\deluge2\deluge\packaging\win\freeze\Deluge>deluge-console.exe info
usage: deluge-console [-h] [-V] [-c <config>] [-l <logfile>] [-L <level>]
                      [--logrotate [<max-size>]] [-q] [--profile [<profile-file>]]
                      [-d <ip_addr>] [-p <port>] [-U <user>] [-P <pass>]
deluge-console: error: unrecognized arguments: info


Quick fix is to in pyinstaller spec, add either an extra line of:

datas += collect_data_files('deluge.ui.console',True,[],["**/__pycache__"])

Or, alternatively prepend a few extra args to line 108 so becomes:

package_data = collect_data_files('deluge',True,[],["**/__pycache__"])

Though latter adds 1.5MiB unneeded files extra.

Anyway, the issue here is deluge.ui.console's declaring:

UI_PATH = __path__[0]

And deluge.ui.console.console using it like:

self.console_cmds = load_commands(os.path.join(UI_PATH, 'cmdline', 'commands'))

So all files correctly picked up and bundled by pyinstaller, but just looked for in wrong place because of this.

I'm making bug-ticket and not PR because don't know how you want tackling this, i.e. if wanting change UI_PATH mechanism instead possibly.

Thanks in advance!

Change History (2)

comment:1 Changed 13 months ago by mhertz

Sorry I made a typo in the alternative(less good) solution, with a trailing newline with a ')', and I also wrote prepend instead of append.

While posting, i'll readd both solutions in more "proper" form to save you little time in case using one of them:

datas += collect_data_files('deluge.ui.console', include_py_files=True, excludes=["**/__pycache__"])
package_data = collect_data_files('deluge', include_py_files=True, excludes=["**/__pycache__"])

comment:2 Changed 9 months ago by master117

I can verify this bug. Very annoying.

Note: See TracTickets for help on using tickets.