[Merged] PR #5376: Addon Manager Install Dependencies

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: PR #5376: Addon Manager Install Dependencies

Post 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 1569 times
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: PR #5376: Addon Manager Install Dependencies

Post 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.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: PR #5376: Addon Manager Install Dependencies

Post 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.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: PR #5376: Addon Manager Install Dependencies

Post 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.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply