Page 2 of 2

Re: PR #5376: Addon Manager Install Dependencies

Posted: Thu Jan 27, 2022 3:38 pm
by Zolko
when I actually install something, it doesn't really work:

1) the window hangs at 100%

2) while the correct directory is created in ~/local/share/FreeCAD/Mod/ , it's empty.

3) the AddonManager doesn't close, FreeCAD doesn't restart

Code: Select all

16:32:49  TypeError: a bytes-like object is required, not 'PySide2.QtCore.QByteArray'
16:32:49  Traceback (most recent call last):
16:32:49    File "/home/hubertz/Documents/CAD/FreeCAD/FreeCAD/FreeCAD_build/Mod/AddonManager/NetworkManager.py", line 248, in <lambda>
16:32:49      lambda i=item.index: self.__data_incoming(i)
16:32:49    File "/home/hubertz/Documents/CAD/FreeCAD/FreeCAD/FreeCAD_build/Mod/AddonManager/NetworkManager.py", line 425, in __data_incoming
16:32:49      f.write(buffer)
16:32:49    File "/usr/lib/python3.7/tempfile.py", line 620, in func_wrapper
16:32:49      return func(*args, **kwargs)
16:32:49  TypeError: a bytes-like object is required, not 'PySide2.QtCore.QByteArray'
16:32:49  Traceback (most recent call last):
16:32:49    File "/home/hubertz/Documents/CAD/FreeCAD/FreeCAD/FreeCAD_build/Mod/AddonManager/addonmanager_workers.py", line 1281, in finish_zip
16:32:49      with zipfile.ZipFile(filename, "r") as zfile:
16:32:49    File "/usr/lib/python3.7/zipfile.py", line 1222, in __init__
16:32:49      self._RealGetContents()
16:32:49    File "/usr/lib/python3.7/zipfile.py", line 1289, in _RealGetContents
16:32:49      raise BadZipFile("File is not a zip file")
16:32:49  zipfile.BadZipFile: File is not a zip file

4) when I update the local cache, I get the error

Code: Select all

Failed to execute Git Python command: check installation of GitPython and/or git

addon.png
addon.png (242.29 KiB) Viewed 1649 times

Re: PR #5376: Addon Manager Install Dependencies

Posted: Thu Jan 27, 2022 3:46 pm
by chennes
It looks to me like you aren't running the latest version so the line number won't line up, but can you find the line in NetworkManager.py (around line 415) that says:

Code: Select all

f.write(buffer)
and replace it with

Code: Select all

f.write(buffer.data())
My recollection is that older versions of Qt didn't do that conversion implicitly, I think that's what's happening.

Re: PR #5376: Addon Manager Install Dependencies

Posted: Thu Jan 27, 2022 4:20 pm
by Zolko
chennes wrote: Thu Jan 27, 2022 3:46 pm It looks to me like you aren't running the latest version so the line number won't line up, but can you find the line in NetworkManager.py (around line 415)..

Code: Select all

f.write(buffer.data())
yep, that did it (line 425). Thank-you. I updated couple of days ago, and it takes hours to compile, so I can't do it all the time.

Re: PR #5376: Addon Manager Install Dependencies

Posted: Thu Jan 27, 2022 4:55 pm
by chennes
Zolko wrote: Thu Jan 27, 2022 4:20 pm yep, that did it (line 425).
Thanks for the report, it's fixed in git commit 97cc2cf16c76a4f73e9d7f4a441aaacfdacd2f64.