hello,
I´m getting the error: no module named PyQt4, while executing the macro screw maker makro(http://www.freecadweb.org/wiki/index.ph ... w_maker1_2).
I already installed PyQt on my mac so what is the problem?
error while execute macro
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 9
- Joined: Sun Mar 16, 2014 3:12 pm
Re: error while execute macro
The problem could be that Python doesn't find the PyQt installation -- so check your sys.path:
Another problem could be that the version of Python PyQt was built with doesn't match with the FreeCAD Python version. Note, for FreeCAD we need Python 2.x.
If not you can extend it with sys.path.append("the_PyQt_path")import sys
sys.path # in this path list the directory of where PyQt is installed must be listed
Another problem could be that the version of Python PyQt was built with doesn't match with the FreeCAD Python version. Note, for FreeCAD we need Python 2.x.
Re: error while execute macro
It could be that your FreeCAD-version is compiled without PyQt4-support and has only PySide instead.BLdevloper wrote:I´m getting the error: no module named PyQt4
I made a new Version of the Macro that should work with both versions.
Ulrich
Re: error while execute macro
Sure, but PyQt can still be used if found.
Re: error while execute macro
I didn't found special topic for screw_maker macro :<
About half of the screw types do not work.
"ISO4017", M5, 20, simple, works, outputs:
"ISO7045", M5, 20, simple, doesn't work (quietly nothing created), outputs less messages:
Why no error message?
Real thread doesn't work. Nothing is created. It seems like it stops at
FreeCAD installed from AUR (Arch Linux)
Version: 0.14
Rev: 3544 (Git)
Release: 2014/05/05 22:24:16
About half of the screw types do not work.
"ISO4017", M5, 20, simple, works, outputs:
Code: Select all
PySyde is used
NominalLength: 20
NominalDiameter: M5
SimpleThread: True
SymbolThread: False
RealThread: False
screw Type ISO4017 selected 5.0 20.0
der Kopf mit l: 20.0
der Kopf mit iso: 0.2
der Kopf mit math a: 1.6
der Kopf geschnitten: 5.0
Placement: Placement [Pos=(0,0,0), Yaw-Pitch-Roll=(0,0,0)]
In Move Screw: <Part::PartFeature>
Selektionen: 1
Code: Select all
PySyde is used
Data checking20
Set Check_result into text TrueISO7045-M5x20 is in library available!
NominalLength: 20
NominalDiameter: M5
SimpleThread: True
SymbolThread: False
RealThread: False
screw Type ISO7045 selected 5.0 20.0
Real thread doesn't work. Nothing is created. It seems like it stops at
Code: Select all
screw_maker1_6.py:2620: pipe = Part.Wire(helix).makePipeShell([cutProfile],makeSolid,isFrenet)
Version: 0.14
Rev: 3544 (Git)
Release: 2014/05/05 22:24:16
Re: error while execute macro
I started a new topic, in order to get better feedback. I recently discovered some problems but did not upload my changes until today. So the latest changes can now be found here: viewtopic.php?f=22&t=6558#p52887ValkaTR wrote:I didn't found special topic for screw_maker macro :<
It seems the pyside migration of FreeCAD changed some more things. In older versions of FreeCAD it was possible to use 0 or 1 instead of False and True. This fails now at actual Linux versions.
There were also some problems at some screw types with the starting of the thread. I could not test all combinations with a real thread, as it takes a long time with each screw. So be patient when generating a screw with a real thread. It may take minutes!
Real threads above M14 may not work. This has to be improved too.
I still have to learn how to handle not expected errors. Debugging of macros with a user interface is no fun as python errors will be catched somewhere without any message.
Thanks for your feedback.
Additional error reports are welcome.
Ulrich