[SOLVED] Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

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!
User avatar
M4x
Veteran
Posts: 1087
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

[SOLVED] Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by M4x »

Hey everybody,

I'm having a problem regarding the Addon Manager. I wasn't able to update the macros FCCircularText and CenterOfMass. Therefore I uninstalled FCCircularText - hopping that a new install would work (worked on workbenches for example). Unfortunately, I'm getting this error message if I try to install FCCurcularText:
Screenshot from 2022-05-20 22-09-43.png
Screenshot from 2022-05-20 22-09-43.png (14.14 KiB) Viewed 682 times
The macro CenterOfMass is still installed and I'd like to update it. Unfortunately, the update fails with this message:
Screenshot from 2022-05-20 22-11-14.png
Screenshot from 2022-05-20 22-11-14.png (26.35 KiB) Viewed 682 times
How should I proceed?

Code: Select all

OS: Ubuntu 20.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.28909 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 2084652)
Hash: 20846523c9d8219ec0fe33c499a64e700d2266b6
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * LCInterlocking
  * kicadStepUpMod 10.12.4
  * Lithophane
  * lattice2 1.0.0
  * Defeaturing
  * Manipulator
  * fasteners 0.3.41
  * sheetmetal 0.2.49
  * Assembly4
  * Curves
  * POV-Ray-Rendering
  * 3DfindIT 1.2.0
Thank you!
Max
Last edited by M4x on Fri Jun 03, 2022 8:23 pm, edited 1 time in total.
User avatar
chennes
Veteran
Posts: 2166
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by chennes »

The first error appears to be because the Macro specified an absolute file path for its icon, and the code to correct that isn't working correctly. The second one I'm not sure of, everything looks in order there. I'd suggest trying to tell the Addon Manager to recache (button in the lower left corner of the AM) and see if that at least resolves the issues.
Chris Hennes
Pioneer Library System
User avatar
Roy_043
Veteran
Posts: 5079
Joined: Thu Dec 27, 2018 12:28 pm

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by Roy_043 »

I recently had the 2nd problem with two macros. I have recached and tried again today. The problem is still there.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.28872 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
Attachments
aerofoil-install.png
aerofoil-install.png (6.92 KiB) Viewed 570 times
import-airfoil-install.png
import-airfoil-install.png (6.32 KiB) Viewed 570 times
User avatar
chennes
Veteran
Posts: 2166
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by chennes »

@Roy_043 that was during an update that you received those errors? Or a clean install?
Chris Hennes
Pioneer Library System
User avatar
M4x
Veteran
Posts: 1087
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by M4x »

chennes wrote: Fri May 20, 2022 11:11 pm [...] The second one I'm not sure of, [...] I'd suggest trying to tell the Addon Manager to recache (button in the lower left corner of the AM) and see if that at least resolves the issues.
Yes, it does. I think I've tried it yesterday too... However, it worked today, thanks! I was able to update macro CenterOfMass.
chennes wrote: Fri May 20, 2022 11:11 pm The first error appears to be because the Macro specified an absolute file path for its icon, and the code to correct that isn't working correctly. [...]
Are you going to look into that code or do you think that the community should work on the macros to get rid of the absolute file pathes for icons (and what else)?

@Roy_o43: I was able to install the macro AeroFoil.
User avatar
chennes
Veteran
Posts: 2166
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by chennes »

I've got a fair amount of code already to clean up the macro metadata, so I probably just have a bug in there. Obviously if the macros themselves had completely valid metadata then none of that would be needed, but quite a few macros have bad icon specifications (most commonly using a wiki "file:" link instead of a direct link to the PNG). That slows down the Addon Manager, but I am hoping in the 0.21 dev cycle to actually do that caching on FreeCAD's server and just have the AM download an already-created cache file, so that speed won't matter.

@Roy_043 I'd also be curious if manually deleting the Addon Manager's cache directory resolves the issue for you -- I am worried that maybe the macro cache file is stale even though you're telling it to recache.
Chris Hennes
Pioneer Library System
User avatar
M4x
Veteran
Posts: 1087
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by M4x »

Alright, thank you very much!
User avatar
Roy_043
Veteran
Posts: 5079
Joined: Thu Dec 27, 2018 12:28 pm

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by Roy_043 »

After deleting the folder:
C:\Users\name\AppData\Local\Temp\FreeCAD\Cache\AddonManager\
and restarting and trying again the problem is still there.

There is what seems to be an error message in the statusbar when I click AeroFoil in the list. See attached image.
Attachments
airfoil-statusbar-message.png
airfoil-statusbar-message.png (4.45 KiB) Viewed 399 times
User avatar
chennes
Veteran
Posts: 2166
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by chennes »

Oh, I forgot that macro is on git and the wiki — the version on git is OK, but it looks like the wiki version has an incorrectly-formatted files list. Do you have git disabled for the AM?
Chris Hennes
Pioneer Library System
User avatar
Roy_043
Veteran
Posts: 5079
Joined: Thu Dec 27, 2018 12:28 pm

Re: Addon Manager - can't install / update Macro FCCircularText and CenterOfMass

Post by Roy_043 »

I do not have Git installed. And I think we should assume the average user does not have it installed either.

The issue with AeroFoil is probably due to this line where a PNG icon is listed that does not exist:
https://github.com/melwyncarlo/AeroFoil ... Macro#L115
__Icon__ = "AeroFoil_UI_Files/AeroFoil.png"

I have update the Macro_AeroFoil wiki page by copying the __Title__ to __Files__ list from Git. And I have also changed the line mentioned above to:
__Icon__ = "AeroFoil_UI_Files/AeroFoil.svg"

After deleting the cache folder an restarting I am still not able to install the macro. I do not understand why M4x is able to do this. The already mentioned error in the statusbar still occurs as well.
Post Reply