AddonManager does not show up in Tools menu (FC 0.20.25843)

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by Smiling_user »

OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.25943 (Git)
Build type: Release
Branch: master
Hash: a65464b722a846bd2999aa2fecdff1132b15b297
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

FreeCAD_weekly-builds-25645-Win-Conda_vc14.x-x86_64.7z
FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64.7z
- both same issue: AddonManager does not show up in Tools menu.
Running as portable, out of the box, or with a FC.bat file (which works nicely with 0.19.2):

Code: Select all

set CURRENTDIR=%cd%
set FREECAD_USER_HOME=%CURRENTDIR%
start bin\FreeCAD.exe -u FreeCAD/user1.cfg -s FreeCAD/system1.cfg --write-log 
What can be the issue, and how to repair it?
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by GeneFC »

Works here.

AddOns.jpg
AddOns.jpg (47.86 KiB) Viewed 3451 times

Most likely is that your config file does not have the entries for the Addons. Portable or not, it is still necessary to have a set of configuration files.

OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.25844 (Git)
Build type: Release
Branch: master
Hash: 1b20118dfa3fb9f127f0e4fb122701f7fcdaa9fc
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

Gene
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by chennes »

If you open up the Macros dialog and hit the "Addons" button, does the Addon Manager launch? Or do you get any error message? I thought that menu item was configured to always show when the Addon Manager was built regardless of whether it can run or not.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by Smiling_user »

1.
chennes wrote: Mon Oct 04, 2021 12:26 am I thought that menu item was configured to always show when the Addon Manager was built regardless of whether it can run or not.
I thought the same. But it does not show up. And Macro> Addons... does not work: no error message, nothing.
User Macros Location: Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\FreeCAD\Macro/

2.
Is there any testing sequence for python console to see what is the issue?

3.
GeneFC wrote: Sun Oct 03, 2021 11:31 pm Most likely is that your config file does not have the entries for the Addons. Portable or not, it is still necessary to have a set of configuration files.
OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.25844 (Git)
Build type: Release
Gene, what should be inside the config Files in regards to AddonManager?
And did I understand correct, that you compiled your version from GIT?

4.
Removed all files from \Roaming\FreeCAD
made a new-clean unpacking from the downloaded archives:
FreeCAD_weekly-builds-25645-Win-Conda_vc14.x-x86_64.7z
FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64.7z
All the same: Standard workbenches are available.
Tools>AddonManager - not shown
Macro >Macros...>Addons - does not launch the AddonManager
Workbenches Manually-copied to Mod folder - are not available.

5.
Could anyone tell me the "bootstrap" sequence of AddonManager? So I could go through the code, and try to find the issue?
For example:
1. on start freecad.exe looks in the ...*.cfg, reads the location of ...
2. goes to location ... looks in each directory for a file ___.....*.py
3. If the file contains the line like "......." then this file is added to a list of loaded workbenches....
....
//Long ago, when was trying to solve the portability issue - to make AddonManager to save all downloaded workbenches locally - I faced this issue of A-M. disappearing from Tools. But don't remember now what these changes were.
Last edited by Smiling_user on Tue Oct 05, 2021 12:28 pm, edited 4 times in total.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by GeneFC »

Smiling_user wrote: Tue Oct 05, 2021 6:30 am Gene, what should be inside the config Files in regards to AddonManager?
And did I understand correct, that you compiled your version from GIT?
I downloaded that version directly from the download page. I compile sometimes, but not that particular version.

I do not know what should be inside the user.cfg. The addon manager entries in my user.cfg include only things like window positions and plugin references. However, I believe the Addon Manager is similar to a workbench. There is an Addon Manager folder in the Mod folder under the FreeCAD top level. If you are playing around with making things portable it is possible that something was moved improperly.

Gene
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by Smiling_user »

I've launched the FC in both approaches: unpack downloaded and run or unpack downloaded and run it with my FC.bat.
in both cases - the same with version
"FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64.7z"

But the version
"FreeCAD_0.20.25645_Win-LPv12.5.4_vc17.x-x86-64.7z"
even does not allow to run main workbenches.

Possibly, something is wrong with access policies on my PC. But it is standard Thinkpad installation of Win7x64.

At current moment, the Report view gave me the following:

Code: Select all

19:30:14  During initialization the error "[WinError 87] The parameter is incorrect" occurred in Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\Mod\AddonManager___\InitGui.py
19:30:14  Please look into the log file for further information
19:30:18  During initialization the error "[WinError 87] The parameter is incorrect" occurred in freecad.asm3
19:30:18  --------------------------------------------------------------------------------
19:30:18  Traceback (most recent call last):
  File "<string>", line 156, in InitApplications
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\site-packages\freecad\asm3\init_gui.py", line 3, in <module>
    from .utils import mainlogger as logger
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\site-packages\freecad\asm3\utils.py", line 11, in <module>
    import numpy as np
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\site-packages\numpy\__init__.py", line 150, in <module>
    from . import core
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\site-packages\numpy\core\__init__.py", line 102, in <module>
    from . import _internal
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\site-packages\numpy\core\_internal.py", line 15, in <module>
    import ctypes
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\ctypes\__init__.py", line 468, in <module>
    GetLastError = windll.kernel32.GetLastError
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\ctypes\__init__.py", line 443, in __getattr__
    dll = self._dlltype(name)
  File "Z:\FreeCAD_weekly-builds-25943-Win-Conda_vc14.x-x86_64\bin\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 87] The parameter is incorrect
19:30:18  --------------------------------------------------------------------------------
19:30:21  Unknown command 'Std_AddonMgr'
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by Smiling_user »

Tryed this:

Code: Select all

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
And got a report:

Code: Select all

20:29:41  During initialization the error "[WinError 127] The specified procedure could not be found: 'Z:\\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\\bin\\lib\\site-packages\\shiboken2'" occurred in Z:\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\Mod\AddonManager\InitGui.py
20:29:41  Please look into the log file for further information
20:29:42  During initialization the error "[WinError 127] The specified procedure could not be found: 'Z:\\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\\bin\\lib\\site-packages\\shiboken2'" occurred in Z:\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\Mod\Arch\InitGui.py
20:29:42  Please look into the log file for further information
20:29:43  During initialization the error "[WinError 127] The specified procedure could not be found: 'Z:\\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\\bin\\lib\\site-packages\\shiboken2'" occurred in Z:\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\Mod\Draft\InitGui.py
20:29:43  Please look into the log file for further information
20:29:44  During initialization the error "[WinError 127] The specified procedure could not be found: 'Z:\\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\\bin\\lib\\site-packages\\shiboken2'" occurred in Z:\FreeCAD-0.19.2.7b5e18a-WIN-x64-portable1\Mod\Tux\InitGui.py
20:29:44  Please look into the log file for further information
20:29:46  DLL load failed while importing StartGui: The parameter is incorrect.
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by Smiling_user »

Tryed also:

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
And received in Report view:

Code: Select all

20:36:17  During initialization the error "[WinError 87] The parameter is incorrect" occurred in Z:\FreeCAD_0.19.24291-Win-Conda_vc14.x-x86_64\Mod\AddonManager\InitGui.py
20:36:17  Please look into the log file for further information
20:36:22  Unknown command 'Std_AddonMgr'
## So for some reason even in the version 0.19. AddonManager stopped working for me...
What could cause this???
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by GeneFC »

Smiling_user wrote: Tue Oct 05, 2021 8:37 pm What could cause this???
I have no real idea what is happening, but clearly something is not loaded in the correct location.

Just for fun I downloaded the portable version and opened it after hiding my usual user.cfg. The portable version worked fine and the Addon Manager menu item was visible and working.

The so-called portable version did create a new user.cfg and a Macro folder in the typical location. I think the portable version may not be really portable, but rather it is a version that does not "install".

If you somehow made the version really portable, such as on a USB stick, there may be some missing configuration files.

Gene
Smiling_user
Posts: 196
Joined: Tue Jul 28, 2020 7:31 am

Re: AddonManager does not show up in Tools menu (FC 0.20.25843)

Post by Smiling_user »

Gene, well, to me it seems to be an issue with file-access-rights. Hear-ed, that the new python version is sensitive to this.
Now - after the newly unpacked version 0.19.2 does not load the same way as the 0.20 - it is definately something with my windows installation or unpacking program.
The "portability" file - just sets FC to run completely locally in a single folder. Only Macros and parts library folders are configured separately.

But who could point to the issue? How to solve the clue. And also this case probably is not a bug of FC...

After setting security settings to "Full control" to all groups of users, the report view still gives out:

Code: Select all

22:32:19  During initialization the error "[WinError 87] The parameter is incorrect" occurred in Z:\FC20\Mod\AddonManager\InitGui.py
22:32:19  Please look into the log file for further information
22:32:23  During initialization the error "[WinError 87] The parameter is incorrect" occurred in freecad.asm3
22:32:23  --------------------------------------------------------------------------------
22:32:23  Traceback (most recent call last):
  File "<string>", line 156, in InitApplications
  File "Z:\FC20\bin\lib\importlib\__init__.py", line 127, in import_module    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "Z:\FC20\bin\lib\site-packages\freecad\asm3\init_gui.py", line 3, in <module>     from .utils import mainlogger as logger
  File "Z:\FC20\bin\lib\site-packages\freecad\asm3\utils.py", line 11, in <module>     import numpy as np
  File "Z:\FC20\bin\lib\site-packages\numpy\__init__.py", line 150, in <module>     from . import core
  File "Z:\FC20\bin\lib\site-packages\numpy\core\__init__.py", line 102, in <module>     from . import _internal
  File "Z:\FC20\bin\lib\site-packages\numpy\core\_internal.py", line 15, in <module>     import ctypes
  File "Z:\FC20\bin\lib\ctypes\__init__.py", line 468, in <module>     GetLastError = windll.kernel32.GetLastError
  File "Z:\FC20\bin\lib\ctypes\__init__.py", line 443, in __getattr__     dll = self._dlltype(name)
  File "Z:\FC20\bin\lib\ctypes\__init__.py", line 373, in __init__     self._handle = _dlopen(self._name, mode)
OSError: [WinError 87] The parameter is incorrect
22:32:23  --------------------------------------------------------------------------------
22:32:26  Unknown command 'Std_AddonMgr'
Post Reply