-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
On Arch Linux, Nagstamon fails to start if there is any executable or file at /usr/bin/resources
. On Arch, the extra/resources
package installs /usr/bin/resources
(which is GNOME's resource monitoring tool) as a binary, causing Nagstamon to treat it as its resources folder.
The error traceback shows:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/PyQt6/uic/ui_file.py", line 35, in __init__
document = ElementTree.parse(ui_file)
File "/usr/lib/python3.13/xml/etree/ElementTree.py", line 1210, in parse
tree.parse(source, parser)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/xml/etree/ElementTree.py", line 562, in parse
source = open(source, "rb")
NotADirectoryError: [Errno 20] Not a directory: '/usr/bin/resources/qui/settings_main.ui'
What I found, that the cause is that in Nagstamon/Config.py
, the code checks:
if os.path.exists(os.path.normcase(os.sep.join((executable_dir, "resources")))):
RESOURCES = ...
os.path.exists()
returns True for files as well as directories.
I made a quick fix locally by replacing os.path.exists(...)
with os.path.isdir(...)
to ensure only directories are considered.
Environment:
Arch Linux
Python 3.13
Metadata
Metadata
Assignees
Labels
No labels