Addon manager issue with new build with Python 3.10

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon manager issue with new build

Post by chennes »

I don't see anything that jumps out at me in the Python 3.10 changelog -- I can't imagine your system has an old version of libssl, if it's already on Py3.10, and the other changes to urllib shouldn't affect us. I've got Manjaro downloading now, I should hopefully be able to spool that up in the coming days.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8867
Joined: Sun Mar 02, 2014 4:35 pm

Re: Addon manager issue with new build

Post by drmacro »

chennes wrote: Sun Jan 09, 2022 4:25 pm I don't see anything that jumps out at me in the Python 3.10 changelog -- I can't imagine your system has an old version of libssl, if it's already on Py3.10, and the other changes to urllib shouldn't affect us. I've got Manjaro downloading now, I should hopefully be able to spool that up in the coming days.
Not sure I noted this previously.

The FEM issue during build happens when attempting use the AUR freecad-git package (not sure that's the right term). And the build fails.

But, if I do a git clone into a local freecad-source and build in freecad-build, the build completes. But Addon manager produces results discussed.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon manager issue with new build

Post by chennes »

drmacro wrote: Sun Jan 09, 2022 4:33 pm But, if I do a git clone into a local freecad-source and build in freecad-build, the build completes. But Addon manager produces results discussed.
FEM is probably going to be over my head, but I can at least figure out the AddonManager issue. Would you mind adding "Python 3.10" to the subject line so I remember which thing this discussion is about?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8867
Joined: Sun Mar 02, 2014 4:35 pm

Re: Addon manager issue with new build

Post by drmacro »

chennes wrote: Sun Jan 09, 2022 4:37 pm
drmacro wrote: Sun Jan 09, 2022 4:33 pm But, if I do a git clone into a local freecad-source and build in freecad-build, the build completes. But Addon manager produces results discussed.
FEM is probably going to be over my head, but I can at least figure out the AddonManager issue.
I was just adding that as possible clues, wasn't suggesting you work on it. ;)

Would you mind adding "Python 3.10" to the subject line so I remember which thing this discussion is about?
Done.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon manager issue with new build with Python 3.10

Post by chennes »

Well, the good news is that on a clean Manjaro VM I can reproduce your error. Of course, the bad news is, I can reproduce your error! But at least with a good example of the failure I can look into it now.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon manager issue with new build with Python 3.10

Post by chennes »

OK, it's an easy fix -- can you please try switching which line is commented out in addonmanager_utilities.py, around line 51, where it says:

Code: Select all

    try:
        # ssl_ctx = ssl.create_default_context(cafile=certifi.where())
        ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
        # ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
Comment out the middle one, and uncomment the last one, so you have:

Code: Select all

    try:
        # ssl_ctx = ssl.create_default_context(cafile=certifi.where())
        # ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
        ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8867
Joined: Sun Mar 02, 2014 4:35 pm

Re: Addon manager issue with new build with Python 3.10

Post by drmacro »

chennes wrote:
I have now tried today's git on two different Manjaro installs.

Addon manager works fine on one.

On the other I get this and it appears to hang (have to kill FC).

Code: Select all

Traceback (most recent call last):
  File "/home/mac/freecad-build/Mod/AddonManager/addonmanager_workers.py", line 1135, in run
    self.run_git(target_dir)
  File "/home/mac/freecad-build/Mod/AddonManager/addonmanager_workers.py", line 1161, in run_git
    self.run_git_clone(clonedir)
  File "/home/mac/freecad-build/Mod/AddonManager/addonmanager_workers.py", line 1222, in run_git_clone
    if current_thread.isInterruptRequested():
AttributeError: 'InstallWorkbenchWorker' object has no attribute 'isInterruptRequested'. Did you mean: 'isInterruptionRequested'?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon manager issue with new build with Python 3.10

Post by chennes »

Sorry - so focused on testing the subtle that I forgot about the obvious... :? git commit 4cc744c92015ccd2b8ea6ba2ba4695b0e24461ef
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: Addon manager issue with new build with Python 3.10

Post by ifohancroft »

I am getting the same problem on Manjaro with the new AppImage.

At first, I got the warning dialog about the addons there not being checked, etc. then when I hit Ok, I get the same error every time. It opens fine in an older AppImage.

Here's the FreeCAD info:

OS: Manjaro Linux (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.27078 (Git) AppImage
Build type: Release
Branch: (HEAD detached at bcdd926)
Hash: bcdd926686f2245fe60baface1cce1ab3dff7a5b
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)

Python on my machine is 3.10.1
`python` is /usr/bin/python which is a symlink to `python3` which is /usr/bin/python3 which itself is a symbolic link to `python3.10` which is in /usr/bin/python3.10

P.S. Going into preferences and changing from 'User-defined proxy' to 'No proxy' seems to resolve the problem.
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
Post Reply