Zolko-123 / FreeCAD_Assembly4

Assembly 4 workbench for FreeCAD
GNU Lesser General Public License v2.1
280 stars 76 forks source link

invalid literal for int() with base 10 #514

Open heeplr opened 4 weeks ago

heeplr commented 4 weeks ago

When changing to the Assembly4 WB, there's an error:

01:02:04  invalid literal for int() with base 10: 'Unkno'
01:02:04  Traceback (most recent call last):
  File "/home/user/.local/share/FreeCAD/Mod/Assembly4/./InitGui.py", line 90, in Initialize
    git = int(FCver[3][0:5])

FreeCAD version: 0.22.0dev from live build on gentoo (which is basically a dev build from current master).

"About" dialog shows:

Version: 0.22.2dev Revision number: Unknown Release date: Unknown

Zolko-123 commented 3 weeks ago

Do you know how to edit Python files ? Can you try to change the line 90 in /home/user/.local/share/FreeCAD/Mod/Assembly4/InitGui.py from

git = int(FCver[3][0:5])

to

try:
    git = int(FCver[3][0:5])
except:
    git = 666
heeplr commented 3 weeks ago

yes, that seems to fix it:

    try:
        git = int(FCver[3][0:5])
    except ValueError:
        git = "unknown"