>>> from FreeCAD import Units
>>> Units.Quantity()
TypeError: function takes exactly 2 arguments (0 given)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<input>", line 1, in <module>
SystemError: <class 'Base.Quantity'> returned a result with an error set
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f44de16d4b0]
#1 /lib/libpython3.6m.so.1.0(PyObject_GetAttrString+0x9) [0x7f44df94dbb9]
#2 0x7f44e0302e3f in App::PropertyPythonObject::Restore(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x60f
#3 0x7f44e02d9e7d in App::DynamicProperty::Restore(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x1ad
#4 0x7f44e0247087 in App::Document::readObjects(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x2d7
#5 0x7f44e024d633 in App::Document::Restore(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x1c3
#6 0x7f44e024ee5d in App::Document::restore() from /work/lib/libFreeCADApp.so+0x1dd
#7 0x7f44e032e023 in App::Application::openDocument(char const*) from /work/lib/libFreeCADApp.so+0x243
#8 0x7f44e0343a2c in App::Application::sOpenDocument(_object*, _object*, _object*) from /work/lib/libFreeCADApp.so+0x5c
If I copy the objects in the file to another document and open this file with py3 everything loads fine.
Traceback (most recent call last):
File "/usr/lib/python3.4/unittest/case.py", line 58, in testPartExecutor
yield
File "/usr/lib/python3.4/unittest/case.py", line 577, in run
testMethod()
File "/home/sgrogan/freecad-py3-build/Mod/Test/TestPythonSyntax.py", line 44, in testAll
test_python_syntax(mod_dir, self.whitelist)
File "/home/sgrogan/freecad-py3-build/Mod/Test/TestPythonSyntax.py", line 27, in test_python_syntax
raise RuntimeError("there are some files not parse-able with the used python-interpreter" + message)
RuntimeError: there are some files not parse-able with the used python-interpreter
##############################
2 python files are not parseable:
1 invalid syntax (/home/sgrogan/freecad-py3-build/Mod/Path/PathScripts/PathKurveUtils.py, line 164)
2 invalid syntax (/home/sgrogan/freecad-py3-build/Mod/Path/PathScripts/phillips_post.py, line 327)
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f44de16d4b0]
#1 /lib/libpython3.6m.so.1.0(PyObject_GetAttrString+0x9) [0x7f44df94dbb9]
#2 0x7f44e0302e3f in App::PropertyPythonObject::Restore(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x60f
#3 0x7f44e02d9e7d in App::DynamicProperty::Restore(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x1ad
#4 0x7f44e0247087 in App::Document::readObjects(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x2d7
#5 0x7f44e024d633 in App::Document::Restore(Base::XMLReader&) from /work/lib/libFreeCADApp.so+0x1c3
#6 0x7f44e024ee5d in App::Document::restore() from /work/lib/libFreeCADApp.so+0x1dd
#7 0x7f44e032e023 in App::Application::openDocument(char const*) from /work/lib/libFreeCADApp.so+0x243
#8 0x7f44e0343a2c in App::Application::sOpenDocument(_object*, _object*, _object*) from /work/lib/libFreeCADApp.so+0x5c
If I copy the objects in the file to another document and open this file with py3 everything loads fine.
Quick question: So this thread is pretty long, and therefore a little daunting to traverse to see if this question was already asked. Hence I apologize in advance if this was asked already: I'd like to know how volunteers could contribute to helping port FC to py3? (From finding bugs to actually developing)
Thanks
Kunda1 wrote: ↑Mon Jun 11, 2018 12:32 am
Quick question: So this thread is pretty long, and therefore a little daunting to traverse to see if this question was already n,asked. Hence I apologize in advance if this was asked already: I'd like to know how volunteers could contribute to helping port FC to py3? (From finding bugs to actually developing)
Thanks
simple install freecad with python 3 and use it. most things will work but there are still some issues. If you find a problem, first try to solve it by your own and make a Pr, if this is not possible post the problem here in this topic so others can try to solve it.
if that also doesn't work, create a bugreport.
I guess currently the most problematic workbench is Path. Maybe trying to do a path-tutorial with a py3 build would be a good start.