Addon Manager freezes FreeCAD up

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager freezes FreeCAD up

Post by chennes »

Olav wrote: Tue Oct 04, 2022 12:09 pm Seems fine, no?
Yep - can you now try to add to the end of that sequence:

Code: Select all

vendor_path = os.path.join(FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages")
call_args = [python_exe, "-m", "pip", "--disable-pip-version-check", "list", "-o", "--path", vendor_path]
proc = subprocess.run(
                call_args,
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,
                check=True,
                timeout=30,
            )
print(proc.stdout.decode())
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Olav
Posts: 211
Joined: Sun Nov 27, 2016 7:58 pm
Location: Netherlands

Re: Addon Manager freezes FreeCAD up

Post by Olav »

chennes wrote: Tue Oct 04, 2022 12:40 pm Yep - can you now try to add to the end of that sequence:

Code: Select all

>>> vendor_path = os.path.join(FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages")
>>> call_args = [python_exe, "-m", "pip", "--disable-pip-version-check", "list", "-o", "--path", vendor_path]
>>> proc = subprocess.run(
...                 call_args,
...                 stdout=subprocess.PIPE,
...                 stderr=subprocess.PIPE,
...                 check=True,
...                 timeout=30,
...             )
>>> print(proc.stdout.decode())

>>>
So, nothing is printed after that last line. I'm guessing that I should have a directory AdditionalPythonPackages somewhere? I tried creating it manually in ~/.local/share/FreeCAD but that doesn't seem to do anything either.
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager freezes FreeCAD up

Post by chennes »

Actually, nothing is a perfectly reasonable response: it just means the Addon Manager hasn’t had to install any dependencies. The important thing is it didn’t hang or give an error.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager freezes FreeCAD up

Post by chennes »

OK, I've made a number of changes that are now merged into the main branch of development, so a git pull should grab them for you. This should at least stop it from hanging on startup, so we can focus on why it's not just gracefully delivering an empty result set. For reference, it's git commit 0963860dd.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Olav
Posts: 211
Joined: Sun Nov 27, 2016 7:58 pm
Location: Netherlands

Re: Addon Manager freezes FreeCAD up

Post by Olav »

chennes wrote: Tue Oct 04, 2022 2:00 pm OK, I've made a number of changes that are now merged into the main branch of development, so a git pull should grab them for you.
Thank you! I just did the pull & make cycle again and... now I can actually use the Addon Manager to install addons! No freezes or scary messages anymore. Case closed, as far as I'm concerned. For curiosity: do you think my method of installing from source had anything to do with this?

Also if I still need to test anything, just let me know.

Code: Select all

OS: Ubuntu 22.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.30531 (Git)
Build type: Unknown
Branch: master
Hash: 0963860dd656f25c8faf73ecafec1e8ff0724db2
Python 3.10.6, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.2
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
  * Curves 0.5.10
  * A2plus 0.4.59d
  * Assembly3 0.11.3
  * fasteners 0.4.15
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager freezes FreeCAD up

Post by chennes »

Installing from source should be totally fine (after all, it's how I use FreeCAD!). I understand why, given no response from pip, the Addon Manager would have locked up, but I don't understand why pip isn't generating output yet.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Olav
Posts: 211
Joined: Sun Nov 27, 2016 7:58 pm
Location: Netherlands

Re: Addon Manager freezes FreeCAD up

Post by Olav »

chennes wrote: Tue Oct 04, 2022 5:16 pm but I don't understand why pip isn't generating output yet.
To be honest I'm not even sure what "pip" is so I can't help you figure it out (I just know that it has something to do with Python). But as I said if I can test something for you I would be glad to do it. I do read the forums a few times a week even if I don't participate much.
Post Reply