Fasteners <class 'Base.ParserError'>: syntax error

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!
Post Reply
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

Fasteners <class 'Base.ParserError'>: syntax error

Post by PAS_Drafter »

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4 0.11.10
  * Curves 0.3.0
  * ExplodedAssembly
  * fasteners 0.3.38
  * Manipulator
  * MOOC 2022.4.21
  * OpticsWorkbench 1.0.8
  * sheetmetal 0.2.49
  * ToolViewReverse_ToolBar
I've started running into this problem in v.20 with the latest version of Fasterner WB. I can import the bolt want (ASMEB18.5.2) with no problem. I then set the diameter and the length using the drop down in the Parameter's section (1/2" and 1 1/2" in my case). I then adjust the position of the bolt to where I want using the Placement dialog. At this point everything works as expected and I have no problems. However, later when I come back and decide to change the diameter or length I start getting and "!" on the part and it gives me an error "Syntax Error" when I put my cursor over it. The console gives me

Code: Select all

09:01:40  Traceback (most recent call last):
  File "C:\Users\PS Tech 01\AppData\Roaming\FreeCAD\Mod\fasteners\.\FastenersCmd.py", line 153, in execute
    fp.lengthCustom = l
<class 'Base.ParserError'>: syntax error
09:01:40  Recompute failed! Please check report view.
I've tried renaming things, changing sizes, but nothing I've done seems to get rid of the error. I end up having to delete the bolt and bring in another one and it will work fine again.

Has anyone else run into this?
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Fasteners <class 'Base.ParserError'>: syntax error

Post by Syres »

The current version of Fasteners is v0.3.45 not 0.3.38 quoted in your post, the fix could well be in those commits.
PAS_Drafter
Posts: 338
Joined: Mon Aug 02, 2021 6:29 am
Location: California, USA

Re: Fasteners <class 'Base.ParserError'>: syntax error

Post by PAS_Drafter »

Syres wrote: Thu Jun 23, 2022 4:53 pm The current version of Fasteners is v0.3.45
DDDOOOHHHH!!! :oops: :oops: :oops:

I forgot I'm working on a different computer that I just updated FreeCAD to .20. On my other one I had updated all the modules, but forgot to go in and have it update the ones on this one after the update.

Thanks for the catch. I'll see if that solves things.

On a side note, I did manage to get the error to go away. After reading the error again (I'm not real familiar with the FreeCAD code) but I noticed the variable name it was referencing was

Code: Select all

fp.lengthCustom = l
. So I went in cleared any data and/or any automatic settings in that field and reset the bolt size using the drop down again. It started working after that.
Post Reply