Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Packaging] Interim deluge-console Windows fix #456

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mhertz
Copy link
Contributor

@mhertz mhertz commented Aug 10, 2024

Deluge-console broke on Windows after commit d559f67, which before that was working because it's source files getting included with rest UI/plugin data copied into place. This workaround here, copies back it's source files into place, to restore old ways, until proper fix can be made.

The underlying workarounded issues here is two-fold. It's not that anything is missing from the freezing, but rather that there at runtime is generated subparsers for the commands, using path_[0] (UI_PATH var in init.py, joined in console.py with rest path), so looking for files/paths not there anymore, as freezed now, and second, the use of OVERRIDES which breaks in freezed env since in decorators.py line 73 trying use inspect.stack()[2][4][0], and in freezed env inspect.stack()[2][4] is None, and hence any mention of inspect.stack()[2][4][0] breaks with 'NoneType object is not subscriptable'. In non-freezed, it returns the call-context correctly, as source code readily available here.

@mhertz mhertz force-pushed the console-winfix branch 2 times, most recently from aa281e7 to 3c3032f Compare August 27, 2024 11:27
@mhertz mhertz force-pushed the console-winfix branch 3 times, most recently from 654e28c to 1eaa06c Compare September 29, 2024 12:21
@mhertz mhertz changed the title [Packaging] Fix deluge-console working again on Windows [Packaging] Interim deluge-console Windows fix Sep 29, 2024
@mhertz mhertz force-pushed the console-winfix branch 3 times, most recently from 435ed45 to 6123189 Compare September 29, 2024 13:01
Deluge-console broke on Windows after commit d559f67, which before that was working because it's source files getting included with rest UI/plugin data copied into place. This workaround here, copies back it's source files into place, to restore old ways, until proper fix can be made.

The underlying workarounded issues here is two-fold. It's not that anything is missing from the freezing, but rather that there at runtime is generated subparsers for the commands, using path_[0] (UI_PATH var in init.py, joined in console.py with rest path), so looking for files/paths not there anymore, as freezed now, and second, the use of OVERRIDES which breaks in freezed env since in decorators.py line 73 trying use inspect.stack()[2][4][0], and in freezed env inspect.stack()[2][4] is None, and hence any mention of inspect.stack()[2][4][0] breaks with 'NoneType object is not subscriptable'. In non-freezed, it returns the call-context correctly, as source code readily available here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant