FreeCAD / FreeCAD-render

The Render workbench
Other
160 stars 34 forks source link

Invalid literal for int() with base 10: '19.4' #197

Closed maciejla closed 2 years ago

maciejla commented 2 years ago

I get following error when trying to open workbench in FreeCAD:

19:34:17  invalid literal for int() with base 10: '19.4'
19:34:17  Traceback (most recent call last):
  File "<string>", line 104, in Initialize
  File "/usr/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/maciej/.FreeCAD/Mod/FreeCAD-render/Render/__init__.py", line 30, in <module>
    from Render.constants import (  # noqa: F401
  File "/usr/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/maciej/.FreeCAD/Mod/FreeCAD-render/Render/constants.py", line 55, in <module>
    FCDVERSION = int(App.Version()[0]), int(App.Version()[1])

FreeCAD version 0.19.4 build 1_voidlinux

Works just fine when I modified it like this, but I know this isn't solution to this problem:

FCDVERSION = int(19), int(4)
howetuft commented 2 years ago

Hello, Thank you for your report. Very strange bug indeed, but I found a workaround (https://github.com/FreeCAD/FreeCAD-render/pull/198). Can you confirm me that it works for you?