0.17_pre - Addon Manager failed

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!
Post Reply
jidoeuf
Posts: 43
Joined: Sun Mar 01, 2015 4:06 pm

0.17_pre - Addon Manager failed

Post by jidoeuf »

When I try to run addon manager (Tools/Addon manager) I've got this error in report view:
Running the Python command 'Std_AddonMgr' failed:
Traceback (most recent call last):
File "C:\Program Files\FreeCAD 0.17\Mod\AddonManager\AddonManagerGui.py", line 10, in Activated
import AddonManager
File "C:\Program Files\FreeCAD 0.17\Mod\AddonManager\AddonManager.py", line 48, in <module>
ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)

'module' object has no attribute 'create_default_context'


Help/About FreeCAD :
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11243 (Git)
Build type: Release
Branch: master
Hash: 6e0f060e96ee54eef1355f221abf0156de45b2da
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: 0.17_pre - Addon Manager failed

Post by sgrogan »

jidoeuf wrote: Wed Jun 07, 2017 11:35 pm When I try to run addon manager (Tools/Addon manager) I've got this error in report view:
confirmed on:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11241 (Git)
Build type: None
Branch: master
Hash: 3c96803d12006411f4563d149fa4f81a1a5993ac
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
AppImage running on Native kubuntu 14.04

Code: Select all

Running the Python command 'Std_AddonMgr' failed:
Traceback (most recent call last):
  File "/tmp/.mount_Ivcgh3/usr/lib/freecad-daily/Mod/AddonManager/AddonManagerGui.py", line 10, in Activated
    import AddonManager
  File "/tmp/.mount_Ivcgh3/usr/lib/freecad-daily/Mod/AddonManager/AddonManager.py", line 48, in <module>
    ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)

'module' object has no attribute 'create_default_context'
"fight the good fight"
jidoeuf
Posts: 43
Joined: Sun Mar 01, 2015 4:06 pm

Re: 0.17_pre - Addon Manager failed

Post by jidoeuf »

I think I found the guilty: git commit b604b27
yorik wrote:ping
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: 0.17_pre - Addon Manager failed

Post by yorik »

hmm word censored.. this commit was normally there to solve other problems met by some other people.
I'll add a check for that create_default_context and if not available, fall back to the version before this fix.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: 0.17_pre - Addon Manager failed

Post by yorik »

Hopefully, fixed in git commit 5c5292cf4
jidoeuf
Posts: 43
Joined: Sun Mar 01, 2015 4:06 pm

Re: 0.17_pre - Addon Manager failed

Post by jidoeuf »

Now, i 've got this error:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.17\Mod\AddonManager\AddonManager.py", line 356, in run
    u = urllib2.urlopen("https://github.com/FreeCAD/FreeCAD-addons",context=ctx)
TypeError: urlopen() got an unexpected keyword argument 'context'
Maybe there is a problem with Python version, https://docs.python.org/2/library/urllib2.html says:
urllib2.urlopen(url[, data[, timeout[, cafile[, capath[, cadefault[, context]]]]])

If context is specified, it must be a ssl.SSLContext instance describing the various SSL options. See HTTPSConnection for more details.

Changed in version 2.7.9: cafile, capath, cadefault, and context were added.
For me:
Python version: 2.7.8
Is there an upgrade to 2.7.13 is necessary ?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: 0.17_pre - Addon Manager failed

Post by yorik »

Fixed (better this time) in git commit ab1b34441
Post Reply