shaise / FreeCAD_FastenersWB

A workbench to add/attach various fasteners to parts
GNU General Public License v2.0
286 stars 86 forks source link

Error while inserting parts from FasteneresWP #392

Closed gilmiz closed 4 months ago

gilmiz commented 4 months ago

When trying to add a screw or nut to a design the following error appears, and the part shows error.
Parts without thread like washer seems to work.

The Report View show:

15:52:21  pyException: Traceback (most recent call last):
  File "C:\Users\gmi\AppData\Roaming\FreeCAD\Mod\fasteners\.\FastenersCmd.py", line 780, in execute
    s = screwMaker.createFastener(self)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gmi\AppData\Roaming\FreeCAD\Mod\fasteners\.\ScrewMaker.py", line 641, in createFastener
    return self.createScrew(func, fastenerAttribs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gmi\AppData\Roaming\FreeCAD\Mod\fasteners\.\screw_maker.py", line 153, in createScrew
    screw = eval(function)
            ^^^^^^^^^^^^^^
  File "<string>", line 1, in <module>
  File "C:\Users\gmi\AppData\Roaming\FreeCAD\Mod\fasteners\.\FsFunctions\FSmakeHexNut.py", line 101, in makeHexNut
    if fa.thread:
       ^^^^^^^^^
<class 'AttributeError'>: 'FSScrewObject' object has no attribute 'thread'
15:52:21  Nut: 'FSScrewObject' object has no attribute 'thread'

FC details:

OS: Windows 11 build 22631 Word size of FreeCAD: 64-bit Version: 0.22.0dev.37841 (Git) Build type: Release Branch: main Hash: 5f761c758e2a0164b00a7183b9c0cbe32688e123 Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2 Locale: Danish/Denmark (da_DK) Installed mods:

  • Assembly4 0.50.13
  • BillOfMaterials 0.0.8.5
  • dodo 1.0.1
  • fasteners 0.5.24
  • Render 2024.6.5
  • sheetmetal 0.4.19

Picture_FastenersWB_1

shaise commented 4 months ago

it looks like your version is not up to date (even though the version shows as the correct one) try uninstalling and reinstalling the WB

gilmiz commented 4 months ago

That did the trick. Thanks.