Add-on manager error

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!
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Add-on manager error

Postby falviani » Fri Jun 19, 2020 4:39 pm

Hi all,

My setup: (built locallly)
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21623 (Git)
Build type: Release
Branch: master
Hash: 4a64679422fb8eaf4129b8d1fea7b46d025fd49e
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

When I try to use the add-on manager to install the parts library I get this error:
copying macro: PartsLibrary.FCMacro
Traceback (most recent call last):
File "E:\Dev\FreeCAD19_Output\Mod\AddonManager\addonmanager_workers.py", line 679, in run
utils.symlink(os.path.join(clonedir, f), os.path.join(macro_dir, f))
File "E:\Dev\FreeCAD19_Output\Mod\AddonManager\addonmanager_utilities.py", line 73, in symlink
os_symlink(source, link_name)
OSError: symbolic link privilege not held

I couldn't find a forum entry with a solution - looks like some kind of permission issue. Can anybody help?

Thanks in advance - Frank
TheMarkster
Posts: 2059
Joined: Thu Apr 05, 2018 1:53 am

Re: Add-on manager error

Postby TheMarkster » Fri Jun 19, 2020 5:00 pm

Try running as administrator.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Add-on manager error

Postby falviani » Fri Jun 19, 2020 5:26 pm

That seems to have worked - the add-on manager showed it as installed, and I was able to use it to preview possible components. THANKS!
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: Add-on manager error

Postby vocx » Fri Jun 19, 2020 5:34 pm

TheMarkster wrote:
Fri Jun 19, 2020 5:00 pm
Try running as administrator.
You shouldn't advice this. Running arbitrary code as administrator is bad in Windows.

The problem is known; in Windows creating symbolic links isn't possible for regular users; there's some trick to fix this but I don't remember right now.

In general, I think all modules downloaded from the Addon Manager that create a symbolic link will fail with a similar error, so this has to be fixed; recommending running as Administrator is not a solution good enough, and may cause problems in the future.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
TheMarkster
Posts: 2059
Joined: Thu Apr 05, 2018 1:53 am

Re: Add-on manager error

Postby TheMarkster » Fri Jun 19, 2020 6:45 pm

vocx wrote:
Fri Jun 19, 2020 5:34 pm
TheMarkster wrote:
Fri Jun 19, 2020 5:00 pm
Try running as administrator.
You shouldn't advice this. Running arbitrary code as administrator is bad in Windows.

The problem is known; in Windows creating symbolic links isn't possible for regular users; there's some trick to fix this but I don't remember right now.

In general, I think all modules downloaded from the Addon Manager that create a symbolic link will fail with a similar error, so this has to be fixed; recommending running as Administrator is not a solution good enough, and may cause problems in the future.
In the future I will advise the user that there could be a risk running as administrator. He can then decide for himself whether to risk it. This is preferable, IMO, than making the decision for him that it is too risky and thus withholding the information.

Here is an article on the subject, which includes a potential workaround.

https://stackoverflow.com/questions/328 ... windows-10
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson