FMPy icon indicating copy to clipboard operation
FMPy copied to clipboard

Error clicking save on linux

Open m-kormann opened this issue 5 months ago • 1 comments

Traceback (most recent call last):
  File "/home/max/Desktop/dist/.venv/lib/python3.11/site-packages/fmpy/util.py", line 1058, in create_zip_archive
    base_path = os.path.normpath(source_dir)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 391, in normpath
TypeError: expected str, bytes or os.PathLike object, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/max/Desktop/dist/.venv/lib/python3.11/site-packages/fmpy/gui/MainWindow.py", line 601, in save
    create_zip_archive(filename=self.filename, source_dir=self.unzipdir)
  File "/home/max/Desktop/dist/.venv/lib/python3.11/site-packages/fmpy/util.py", line 1057, in create_zip_archive
    with zipfile.ZipFile(filename, 'w', zipfile.ZIP_DEFLATED) as zf:
  File "/usr/lib/python3.11/zipfile.py", line 1345, in __exit__
    self.close()
  File "/usr/lib/python3.11/zipfile.py", line 1901, in close
    self._write_end_record()
  File "/usr/lib/python3.11/zipfile.py", line 1995, in _write_end_record
    self.fp.write(endrec)
  File "/usr/lib/python3.11/zipfile.py", line 791, in write
    n = self.fp.write(data)
        ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'

m-kormann avatar Aug 22 '25 09:08 m-kormann

Also, icons are greyed out although they are clickable:

Image

m-kormann avatar Aug 22 '25 09:08 m-kormann