chipmuenk / pyfda

Python Filter Design Analysis Tool
http://chipmuenk.github.io/
MIT License
653 stars 93 forks source link

Self-extracting archives crash with some Linux distributions #255

Closed ekleimeier closed 2 weeks ago

ekleimeier commented 2 weeks ago

Pyfda version 0.9.2 for Linux crashes on startup on Fedora 40.

Error Log:

Traceback (most recent call last):
  File "jschon/catalog/__init__.py", line 46, in __call__
  File "jschon/utils.py", line 48, in json_loadf
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEId5iHL0/jschon/catalog/json-schema-2020-12/schema.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pyfda/pyfdax.py", line 23, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "pyfda/pyfda_rc.py", line 21, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "pyfda/libs/pyfda_lib.py", line 114, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "amaranth/__init__.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "amaranth/hdl/__init__.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "amaranth/hdl/_rec.py", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "amaranth/lib/wiring.py", line 1725, in <module>
  File "abc.py", line 106, in __new__
  File "amaranth/lib/meta.py", line 64, in __init_subclass__
  File "amaranth/lib/meta.py", line 37, in __jschon_schema
  File "jschon/__init__.py", line 49, in create_catalog
  File "jschon/catalog/_2020_12.py", line 103, in initialize
  File "jschon/catalog/__init__.py", line 215, in create_metaschema
  File "jschon/catalog/__init__.py", line 158, in load_json
  File "jschon/catalog/__init__.py", line 53, in __call__
jschon.exc.CatalogError: No such file or directory: '/tmp/_MEId5iHL0/jschon/catalog/json-schema-2020-12/schema.json'
[PYI-40111:ERROR] Failed to execute script 'pyfdax' due to unhandled exception!
chipmuenk commented 2 weeks ago

How did you install pyfda - with pip install or by using a self extracting archive?

ekleimeier commented 2 weeks ago

Via the self extracting archive

chipmuenk commented 2 weeks ago

Self-extracting archives are generated by pyInstaller, based on the underlying OS. Via Github actions I generate archives using Windows, MacOS and Ubuntu/Debian operating systems. The resulting archives only run on the corresponding OS.

Linux is more varied than the other OS, it seems an archive generated under Debian won't run under a RHEL based Linux like Fedora out of the box. I'll try to setup my pyInstaller script to include RHEL but I can't promise anything.

Flatpak would be a more universal solution, unfortunately, the build process doesn't work anymore and I can't get my head around the build process. I also haven't managed to get support yet. You could use the pyfda version from flathub but it is two years old.

Of course pip install pyfda is also an option (preferrably in a separate environment).

chipmuenk commented 2 weeks ago

Unfortunately, GitHub only provides Ubuntu when running Linux. As pyinstaller archives for Linux are a somewhat special case, I'm afraid this issue is too difficult to fix for me. I'll make it more clear that only Ubuntu / Debian - based Distros are supported.