Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

Bernard19, this feature is on the Development branch. Could you if you are using the master/main branch or the development?

If you installed it from the package manager this is not ins the development branch by default.

Ah, it would be nice to be able to select the branch when downloading stuff with the package manager.
User avatar
Bernard19
Posts: 887
Joined: Sun Feb 20, 2022 7:16 pm

Re: Assembly 4 workbench

Post by Bernard19 »

@leoheck
I installed Assembly 4 by Addon Manager. I use for windows this version

Code: Select all

OS: Windows 11 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.33110 (Git)
Build type: Release
Branch: master
Hash: 18e40941ceb36c52701a7c74ea26043ef3385701
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: French/France (fr_FR)
Installed mods: 
  * A2plus 0.4.60n
  * Assembly4 0.50.2
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

I see. So, to use the development branch you have to have developer skills.
In short, you can clone the Ams4 repo in the right Folder, then you can switch to the development branch.
Do you know how to do that?

I believe the package manager clone repos. So you just have to navigate to the Asm4 folder and switch to the development branch.
Something like this.

Code: Select all

cd <path_to_freecad_mod_folde_on_windows>
git branch | cat # just to see the current branch
git checkout development
# then restart freecad
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 workbench

Post by Kunda1 »

You should be able to specify via the Addon Manager UI to utilize a specific branch of A4. I don't have the exact instructions in front of me ATM.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: Assembly 4 workbench

Post by mfro »

Kunda1 wrote: Thu May 11, 2023 11:57 am You should be able to specify via the Addon Manager UI to utilize a specific branch of A4. I don't have the exact instructions in front of me ATM.
Correct. There's an option in AddonManager preferences that is supposed to enable selection of git branches. While this indeed enables such button in AddonManager, it's selection (for Assembly4) just yields this:

Code: Select all

Traceback (most recent call last):
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/package_details.py", line 635, in change_branch_clicked
    change_branch_dialog = ChangeBranchDialog(path_to_repo, self)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/change_branch.py", line 56, in __init__
    self.item_model = ChangeBranchDialogModel(path, self)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/change_branch.py", line 182, in __init__
    if hasattr(ref, "tracking_branch") and ref.tracking_branch():
                                           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/git/refs/head.py", line 187, in tracking_branch
    if reader.has_option(self.k_config_remote) and reader.has_option(self.k_config_remote_ref):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/git/config.py", line 181, in <lambda>
    return lambda *args, **kwargs: self._call_config(attr, *args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/git/config.py", line 187, in _call_config
    return getattr(self._config, method)(self._section_name, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/git/config.py", line 121, in assure_data_present
    self.read()
  File "/usr/lib/python3/dist-packages/git/config.py", line 614, in read
    self._read(fp, fp.name)
  File "/usr/lib/python3/dist-packages/git/config.py", line 455, in _read
    line = fp.readline().decode(defenc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 17: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_utilities.py", line 445, in run_interruptable_subprocess
    stdout, stderr = p.communicate(timeout=0.1)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1207, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 2060, in _communicate
    self._check_timeout(endtime, orig_timeout, stdout, stderr)
  File "/usr/lib/python3.11/subprocess.py", line 1251, in _check_timeout
    raise TimeoutExpired(
subprocess.TimeoutExpired: Command '['/usr/bin/git', 'fetch']' timed out after 0.1 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_workers_startup.py", line 557, in run
    checker.check_package(repo)
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_workers_startup.py", line 632, in check_package
    self.check_workbench(package)
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_workers_startup.py", line 609, in check_workbench
    if self.git_manager.update_available(clonedir):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_git.py", line 159, in update_available
    self._synchronous_call_git(["fetch"])
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_git.py", line 352, in _synchronous_call_git
    proc = utils.run_interruptable_subprocess(final_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mfro/Dokumente/Development/freecad/build/Mod/AddonManager/addonmanager_utilities.py", line 450, in run_interruptable_subprocess
    raise ProcessInterrupted()
addonmanager_utilities.ProcessInterrupted
(apparently tries to read an ASCII string where UTF would be more appropriate).
Cheers,
Markus
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

@chennes, can you help us with the issues discussed above? I believe you helped or were the main dev making the addon manager.
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Assembly 4 workbench

Post by chennes »

Sure -- but the error posted just above doesn't look like it's coming from the latest version of the Addon Manager. Can you confirm that this is a recent dev build? We shouldn't be using the python git package anymore.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: Assembly 4 workbench

Post by mfro »

chennes wrote: Thu May 11, 2023 9:35 pm... but the error posted just above doesn't look like it's coming from the latest version of the Addon Manager...
I apologize:

Code: Select all

OS: Debian GNU/Linux 12 (bookworm) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33162 (Git)
Build type: Release
Branch: master
Hash: 86128f1de2a7ee3830edc0b083b4b376bb68b7df
Python 3.11.2, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * lattice2 1.0.0
  * Help 1.0.3
  * Assembly4 0.50.2
  * Help.backup1661594724.9387012
  * Behave-Dark-Colors.backup1661598364.718598
  * Assembly4.backup1661591923.0362408
  * Curves 0.6.8
It's a brand new build.
Cheers,
Markus
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Assembly 4 workbench

Post by chennes »

That means there’s a chunk of code in Addon Manager that hasn’t been migrated (no real surprise there, this is seldomly used). At least that gives us a path to fix the bug, though. I have a lot on my plate right now, but can try to look at it sometime next week.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

@chennes thank you for your comment. you always reply nicely and help a lot.

[This is still Off-Topic on Asm4]

I still want to ask this. Is it possible to select the branch of the Addon that is going to be downloaded, with the Addon Manager? How? Do you have a link showing it or can you quickly point us the path?
Post Reply