-
Notifications
You must be signed in to change notification settings - Fork 237
Commit 21a74cd
committed
Fixed startup error (app icon and stock configs can't be found)
I get the following error on startup:
$ python3 chirpwx.py
Traceback (most recent call last):
File "/home/asheplyakov/work/radio/chirp/chirpwx.py", line 8, in <module>
sys.exit(chirpmain())
File "/home/asheplyakov/work/radio/chirp/chirp/wxui/__init__.py", line 94, in chirpmain
mainwindow = main.ChirpMain(None, title='CHIRP')
File "/home/asheplyakov/work/radio/chirp/chirp/wxui/main.py", line 307, in __init__
self.set_icon()
File "/home/asheplyakov/work/radio/chirp/chirp/wxui/main.py", line 342, in set_icon
importlib_resources.files('chirp.share')
File "/usr/lib64/python3.9/importlib/resources.py", line 147, in files
return _common.from_package(_get_package(package))
File "/usr/lib64/python3.9/importlib/_common.py", line 14, in from_package
return fallback_resources(package.__spec__)
File "/usr/lib64/python3.9/importlib/_common.py", line 18, in fallback_resources
package_directory = pathlib.Path(spec.origin).parent
File "/usr/lib64/python3.9/pathlib.py", line 1072, in __new__
self = cls._from_parts(args, init=False)
File "/usr/lib64/python3.9/pathlib.py", line 697, in _from_parts
drv, root, parts = self._parse_args(args)
File "/usr/lib64/python3.9/pathlib.py", line 681, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The problem is that 'chirp.share' is not a proper python package,
therefore importlib fails to locate its resources.
To avoid the problem this patch adds empty __init__.py files to
chirp/share and chirp/stock_configs directories.
As a side effect setup.py installs (the content of) these directories
(which makes packagers more happy).1 parent a4842a3 commit 21a74cdCopy full SHA for 21a74cd
2 files changed
+0
-0
lines changedWhitespace-only changes.
chirp/stock_configs/__init__.py
Copy file name to clipboardexpand all lines: chirp/stock_configs/__init__.pyWhitespace-only changes.
0 commit comments