Addon Manager problem with A2plus WB

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
fatbeard
Posts: 108
Joined: Thu Oct 22, 2020 7:47 am

Addon Manager problem with A2plus WB

Post by fatbeard »

Not happy with the installed A2Plus assembly workbench (it fails to implement a simple plane coincidence restraint, and introduces inexplainable offsets) I tried to remove it.
The addon manager says it is installed, so I select it and press "Uninstall selected"; only to be confronted with:

12:32:44 Traceback (most recent call last):
12:32:44 File "/usr/lib/python3.8/shutil.py", line 649, in _rmtree_safe_fd
12:32:44 dirfd = os.open(entry.name, os.O_RDONLY, dir_fd=topfd)
12:32:44 PermissionError: [Errno 13] Permission denied: 'Resources'
12:32:44
During handling of the above exception, another exception occurred:

12:32:44 Traceback (most recent call last):
12:32:44 File "/usr/share/freecad/Mod/AddonManager/AddonManager.py", line 491, in remove
12:32:44 shutil.rmtree(clonedir, onerror=self.remove_readonly)
12:32:44 File "/usr/lib/python3.8/shutil.py", line 718, in rmtree
12:32:44 _rmtree_safe_fd(fd, path, onerror)
12:32:44 File "/usr/lib/python3.8/shutil.py", line 655, in _rmtree_safe_fd
12:32:44 _rmtree_safe_fd(dirfd, fullname, onerror)
12:32:44 File "/usr/lib/python3.8/shutil.py", line 651, in _rmtree_safe_fd
12:32:44 onerror(os.open, fullname, sys.exc_info())
12:32:44 File "/usr/share/freecad/Mod/AddonManager/AddonManager.py", line 479, in remove_readonly
12:32:44 func(path)
12:32:44 TypeError: open() missing required argument 'flags' (pos 2)
12:32:44 Error in sys.excepthook:
12:32:44 Traceback (most recent call last):
12:32:44 File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
12:32:44 with os.fdopen(os.open(pr_filename,
12:32:44 FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_freecad_bin_freecad-python3.5003.crash'
12:32:44
Original exception was:
12:32:44 Traceback (most recent call last):
12:32:44 File "/usr/lib/python3.8/shutil.py", line 649, in _rmtree_safe_fd
12:32:44 dirfd = os.open(entry.name, os.O_RDONLY, dir_fd=topfd)
12:32:44 PermissionError: [Errno 13] Permission denied: 'Resources'
12:32:44
During handling of the above exception, another exception occurred:

12:32:44 Traceback (most recent call last):
12:32:44 File "/usr/share/freecad/Mod/AddonManager/AddonManager.py", line 491, in remove
12:32:44 shutil.rmtree(clonedir, onerror=self.remove_readonly)
12:32:44 File "/usr/lib/python3.8/shutil.py", line 718, in rmtree
12:32:44 _rmtree_safe_fd(fd, path, onerror)
12:32:44 File "/usr/lib/python3.8/shutil.py", line 655, in _rmtree_safe_fd
12:32:44 _rmtree_safe_fd(dirfd, fullname, onerror)
12:32:44 File "/usr/lib/python3.8/shutil.py", line 651, in _rmtree_safe_fd
12:32:44 onerror(os.open, fullname, sys.exc_info())
12:32:44 File "/usr/share/freecad/Mod/AddonManager/AddonManager.py", line 479, in remove_readonly
12:32:44 func(path)
12:32:44 TypeError: open() missing required argument 'flags' (pos 2)

and nothing else, the status of the workbench was unchaged.
However, in the list of workbenches the A2Plus is gone. But not according to the addon manager, who still thinks it is there...
Closer investigation learns that the permissions of that directory were set to write only, but as owner I could not change that ?!?
The system manager resolved the permission issue, after which the addon manager was able to uninstall it: no more errors.
On to the Assembly4 workbench...

OS: Linux Mint 20 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 0d9536ed3e8c7f40197b5606e1b7873625e1d6fe
Python version: 3.8.10
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
Nothing is ever impossible for those that don't have to do it.
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Addon Manager problem with A2plus WB

Post by chrisb »

Moved from Help forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
chennes
Veteran
Posts: 3915
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager problem with A2plus WB

Post by chennes »

Thanks for the report: I'll try to catch that error and give a more useful error message.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply