[Deluge] #3546: Deluge-console fails on windows.

4 views
Skip to first unread message

Deluge

unread,
Aug 21, 2022, 7:55:34 PM8/21/22
to delug...@googlegroups.com
#3546: Deluge-console fails on windows.
----------------------------+------------------------
Reporter: mhertz | Type: bug
Status: new | Priority: minor
Milestone: needs verified | Component: Console UI
Version: develop | Keywords:
----------------------------+------------------------
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

C:\deluge2\deluge\packaging\win\freeze\Deluge>
}}}

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 __init.py__ 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!

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3546>
Deluge <https://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Aug 23, 2022, 5:57:53 PM8/23/22
to delug...@googlegroups.com
#3546: Deluge-console fails on windows.
-------------------------+----------------------------
Reporter: mhertz | Owner:

Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Console UI | Version: develop
Resolution: | Keywords:
-------------------------+----------------------------

Comment (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__"])
}}}

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3546#comment:1>

Reply all
Reply to author
Forward
0 new messages