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

Kupfer v323: [kupfer.core.plugins]: SyntaxError: '(' was never closed (apt_tools.py, line 14) #173

Closed
hosiet opened this issue Dec 6, 2023 · 2 comments

Comments

@hosiet
Copy link

hosiet commented Dec 6, 2023

Environment

Kupfer Version: v323
Window Manager: KWin
Desktop Environment: KDE Plasma 5.27.9
Linux Distribution: Debian Sid/Unstable

Actual Behaviour

The following stderr output appears when I open the "preferences" dialog:

INF [kupfer.ui.browser] WindowController: Trying to register <Ctrl>space to spawn kupfer.. success
INF [kupfer.ui.session] SessionClient: Warning: Not able to connect to current desktop session, please Quit before logout to save kupfer's data.
ERR [kupfer.core.plugins]: When loading kupfer.plugin.apt_tools
EXC [kupfer.core.plugins]: SyntaxError: '(' was never closed (apt_tools.py, line 14)
INF [kupfer.core.sources] PeriodicRescanner: Starting new campaign, interval 1 s

Looking at the source code:

from __future__ import annotations
__kupfer_name__ = _("APT")
__kupfer_sources__ = ()
__kupfer_text_sources__ = ()
__kupfer_actions__ = (
"ShowPackageInfo",
"SearchPackageName",
"InstallPackage",
"OpenPackageWebsite",
"SearchForFile",
)
__description__ = _("Interface with the package manager APT")
__version__ = ""
__author__ = (
"Martin Koelewijn <martinkoelewijn@gmail.com>, "
"Ulrik Sverdrup <ulrik.sverdrup@gmail.com>"
)

I don't quite understand why there is a such SyntaxError.

Expected Behaviour

No stderr output appears.

@KarolBedkowski
Copy link
Contributor

Well, there is no error in line 14. I can't reproduce this error.

Please check is your (local) apt_tools.py file is correct. Ale delete all pycache dirs in Kupfer dir.
If you have updated code from repo - maybe merge failed.

@hosiet
Copy link
Author

hosiet commented Dec 8, 2023

I don't understand this error as well. When executed directly from freshly-cloned repository, this error will occur. I have made sure that no pycache dir is present. See the terminal interaction history below:

$ git show -q | tee
commit d54cd17eeef4079db354cc50498b4d03a9834ba3
Author: Karol Będkowski <karol.bedkowski@gmail.com>
Date:   Fri Nov 24 18:27:32 2023 +0100

    doc: update News and README and bump version to v323 (final)
$ git clean -xdf
$ python3 kupfer.py 
rich.traceback installed
Kupfer: A free software (GPLv3+) launcher
   Copyright © 2007–2023 Ulrik Sverdrup with others
   https://kupferlauncher.github.io/

INF [kupfer.core.sources] SourceController: Initial sources load
INF [kupfer.core.sources] PeriodicRescanner: scan Favorites: 2 leaves in 0.00046 s
INF [kupfer.core.sources] PeriodicRescanner: scan Toggle Recent Documents: 0 leaves in 0.00000 s
INF [kupfer.core.sources] PeriodicRescanner: scan Clipboards: 0 leaves in 0.00002 s
INF [kupfer.core.sources] PeriodicRescanner: scan Applications: 138 leaves in 0.00002 s
INF [kupfer.core.sources] PeriodicRescanner: scan Trash: 1 leaves in 0.00000 s
INF [kupfer.core.sources] PeriodicRescanner: scan Recent Items: 143 leaves in 0.00001 s
INF [kupfer.core.sources] PeriodicRescanner: scan Triggers: 0 leaves in 0.00001 s
INF [kupfer.core.sources] PeriodicRescanner: scan Volumes and Disks: 0 leaves in 0.00025 s
INF [kupfer.core.sources] PeriodicRescanner: scan hosiet: 42 leaves in 0.00000 s
INF [kupfer.core.sources] PeriodicRescanner: scan Places: 13 leaves in 0.00000 s
INF [kupfer.core.sources] PeriodicRescanner: scan Desktop: 19 leaves in 0.00000 s
INF [kupfer.ui.browser] WindowController: Trying to register <Ctrl>space to spawn kupfer.. success
INF [kupfer.ui.session] SessionClient: Warning: Not able to connect to current desktop session, please Quit before logout to save kupfer's data.
ERR [kupfer.core.plugins]: When loading kupfer.plugin.apt_tools
EXC [kupfer.core.plugins]: SyntaxError: '(' was never closed (apt_tools.py, line 14)
INF [kupfer.core.sources] PeriodicRescanner: Starting new campaign, interval 1 s
INF [kupfer.core.sources] PeriodicRescanner: Campaign finished, pausing 60 s
^C^CINF [kupfer.ui.browser] WindowController: Caught signal 2 exiting..
INF [kupfer.core.datactrl] DataController: Saving data...
INF [kupfer.core.datactrl] DataController: Saving cache...

Just FYI, the error message appears when I click the following menu entry:

图片

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

No branches or pull requests

2 participants