Addon Manager not working as expected

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
MeSat
Posts: 43
Joined: Fri Jul 10, 2015 4:43 am

Addon Manager not working as expected

Post by MeSat »

Hello, I found two issues with the addon manager that has caused me a major problem.

I have version 0.18, don't know the build as it is not listed in the about. It is on Fedora from the Fedora repo.

I am running FreeCAD behind a well locked down corporate firewall which runs everything through a proxy. I have the proxy set up correctly and can connect to various sites with a browser and I thought through FreeCAD when I went to install a bunch of addons a few weeks ago. Today I went to use one of the addons and it was not there even though the Addon Manager had a checkmark that it was installed.

Did some searching and found that addons should be installed in ~/.FreeCAD/Mod/{addon} and I compared it to my system at home.

All the addon subdirectories were empty on the corporate machine but were filled with data and code.

Further in my investigation, I found out that some required python code was not installed on the corporate machine. Since I was missing some python modules that FreeCAD required, I installed them from the Corporate Fedora mirror. GitPython as an example.

Now, I cannot even open the Addon Manager as it freezes on checking for possible updates. Looking at the error log, I see that it is related to certificates not being passed or accepted by the corporate firewall. Our corporation will not accept self signed certificates. I know that the Python internal installer (pip) won't work through the firewall which is why the necessary python code is on my home machine as it was possibly installed by FreeCAD.

The issue at work is that FreeCAD Addon Manager stated that the Addon's were installed when they were not installed. And due to the firewall issue, now that the python tools are installed, it freezes the Addon Manager as the certificates for the 3D_Printing_Tools gets stuck. Needs to have a timeout of something to stop this. Also the Addon Manager should check to ensure that the selected Addon is actually installed before checking it off.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Addon Manager not working as expected

Post by yorik »

Basically the addons manager gets its list from https://github.com/FreeCAD/FreeCAD-addons
then, for each addon, there is a different URL. At the moment, they are all hosted on github. But in the future that could change quickly (gitlab,framagit, etc..)

It is indeed a bug if the addonmanager appears to have installed a workbench, but it has not. Indeed it starts by creating the folder, and if the folder is present, that's enough for it to believe the addon is installed. I just fixed this in git commit 347b81807

GitPython is not necessary to install addons, it just allows to use git, which allows to not download the whole addon again when there is an update.

I added a timeout to url fetching a couple of weeks ago... Which version of FreeCAD are you using?
goldmen8
Posts: 11
Joined: Sun Oct 18, 2020 8:07 pm

Re: Addon Manager not working as expected

Post by goldmen8 »

Hello. I wrote in the Russian branch but no one could give an answer there.
https://forum.freecadweb.org/viewtopic. ... 17#p441217

The list in "Addon manager" stopped being filled in. The "Workbenches" tab is filled with a single "3D_Printing_Tools" and then silence there are no other workbenches and do not appear.
Image
And the "Macros" tab is filled with macro names, but they remain gray and inactive.
A message is issued:
GitPython not installed! Cannot retrieve macros from git
Unable to fetch the code of this macro.Traceback (most recent call last):
File "C:\Program Files\FreeCAD 0.18\Mod\AddonManager\AddonManager.py", line 852, in run
self.macro.fill_details_from_wiki(url)
File "C:\Program Files\FreeCAD 0.18\Mod\AddonManager\addonmanager_macro.py", line 144, in fill_details_from_wiki
code = code.decode('utf8')
AttributeError: 'list' object has no attribute 'decode'

Tell me what to do and how to fix it?
Last edited by goldmen8 on Fri Oct 23, 2020 9:37 pm, edited 1 time in total.
Bance
Veteran
Posts: 4264
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Addon Manager not working as expected

Post by Bance »

search the forum
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Addon Manager not working as expected

Post by keithsloan52 »

MeSat wrote: Fri Aug 09, 2019 6:28 am Hello, I found two issues with the addon manager that has caused me a major problem.

I have version 0.18, don't know the build as it is not listed in the about. It is on Fedora from the Fedora repo.

I am running FreeCAD behind a well locked down corporate firewall which runs everything through a proxy. I have the proxy set up correctly and can connect to various sites with a browser and I thought through FreeCAD when I went to install a bunch of addons a few weeks ago. Today I went to use one of the addons and it was not there even though the Addon Manager had a checkmark that it was installed.

Did some searching and found that addons should be installed in ~/.FreeCAD/Mod/{addon} and I compared it to my system at home.

All the addon subdirectories were empty on the corporate machine but were filled with data and code.

Further in my investigation, I found out that some required python code was not installed on the corporate machine. Since I was missing some python modules that FreeCAD required, I installed them from the Corporate Fedora mirror. GitPython as an example.

Now, I cannot even open the Addon Manager as it freezes on checking for possible updates. Looking at the error log, I see that it is related to certificates not being passed or accepted by the corporate firewall. Our corporation will not accept self signed certificates. I know that the Python internal installer (pip) won't work through the firewall which is why the necessary python code is on my home machine as it was possibly installed by FreeCAD.

The issue at work is that FreeCAD Addon Manager stated that the Addon's were installed when they were not installed. And due to the firewall issue, now that the python tools are installed, it freezes the Addon Manager as the certificates for the 3D_Printing_Tools gets stuck. Needs to have a timeout of something to stop this. Also the Addon Manager should check to ensure that the selected Addon is actually installed before checking it off.
I think there is a problem with FreeCAD 0.18 snf addon manager and you need a later version of FreeCAD 0.19 for things to now work.

Not sure if your corporate firewall will allow but you could try directly cloning a workbench GitHub repro to ~/.FreeCAD/Mod.
i.e. Go to the relevant GitHub repro, click on the Green 'Code' icon and select the option to copy the clone command to you clipboard, then from a terminal window that you have cd'ed to ~/.FreeCAD/Mod, type git clone, then paste your clipboard and hit enter. Start or restart FreeCAD.
jillenberger
Posts: 1
Joined: Wed Nov 11, 2020 12:08 am

Re: Addon Manager not working as expected

Post by jillenberger »

goldmen8 wrote: Thu Oct 22, 2020 6:52 pm Hello. I wrote in the Russian branch but no one could give an answer there.
https://forum.freecadweb.org/viewtopic. ... 17#p441217

The list in "Addon manager" stopped being filled in. The "Workbenches" tab is filled with a single "3D_Printing_Tools" and then silence there are no other workbenches and do not appear.
Image
And the "Macros" tab is filled with macro names, but they remain gray and inactive.
A message is issued:
GitPython not installed! Cannot retrieve macros from git
Unable to fetch the code of this macro.Traceback (most recent call last):
File "C:\Program Files\FreeCAD 0.18\Mod\AddonManager\AddonManager.py", line 852, in run
self.macro.fill_details_from_wiki(url)
File "C:\Program Files\FreeCAD 0.18\Mod\AddonManager\addonmanager_macro.py", line 144, in fill_details_from_wiki
code = code.decode('utf8')
AttributeError: 'list' object has no attribute 'decode'

Tell me what to do and how to fix it?
I am having this same problem. I have been loading addons manually through the github page but can not always get them to work correctly. Looking for some answers.
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Addon Manager not working as expected

Post by chrisb »

If you have the same problem go for the same solution and use 0.19.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
goldmen8
Posts: 11
Joined: Sun Oct 18, 2020 8:07 pm

Re: Addon Manager not working as expected

Post by goldmen8 »

Addon manager in 0.18 broke, because it is implemented rather poorly - it parses the github site. The github has changed, and the old addon Manager no longer works (not supported). Only the addon Manager works in 0.19 (64 bits). On 0.18 Addons can only be installed manually.
But it is not always possible to install a 64-bit system. It became inconvenient, I used FreeCAD-0.18.4. 980bf90-WIN-x32-portable.
Post Reply