View Issue Details

IDProjectCategoryView StatusLast Update
0000164FreeCADBugpublic2010-11-15 15:53
Reportergu1do Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionwon't fix 
Product Version0.10 
Fixed in Version0.11 
Summary0000164: draft icon & python errors when choosing 'move' on os x 10.6
Descriptiondownloaded FreeCAD_i386_R2943.dmg and installed fine.
created a cube, tried to move it by choosing 'move' from the draft toolbar. by the way, all the icons in the draft toolbar display as "X"s.

got this error:


from output tab:

Error: Python-qt4 package must be installed on your system to use the Draft module.<type 'exceptions.NameError'>
Cannot find icon: Draft_line
Cannot find icon: Draft_polyline
Cannot find icon: Draft_circle
Cannot find icon: Draft_arc
Cannot find icon: Draft_rectangle
Cannot find icon: Draft_text
Cannot find icon: Draft_dimension
Cannot find icon: Draft_move
Cannot find icon: Draft_rotate
Cannot find icon: Draft_offset
Cannot find icon: Draft_trimex
Cannot find icon: Draft_upgrade
Cannot find icon: Draft_downgrade
Cannot find icon: Draft_scale
Cannot find icon: Draft_apply
Cannot find icon: Draft_apply
Cannot find icon: Draft_arc
Cannot find icon: Draft_circle
Cannot find icon: Draft_lock
Cannot find icon: Draft_dimension
Cannot find icon: Draft_downgrade
Cannot find icon: Draft_finish
Cannot find icon: Draft_line
Cannot find icon: Draft_move
Cannot find icon: Draft_offset
Cannot find icon: Draft_polyline
Cannot find icon: Draft_rectangle
Cannot find icon: Draft_rotate
Cannot find icon: Draft_scale
Cannot find icon: Draft_text
Cannot find icon: Draft_trimex
Cannot find icon: Draft_rotate
Cannot find icon: Draft_upgrade
Running the Python command 'Draft_Move' failed:
Traceback (most recent call last):
  File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 1693, in Activated
    Modifier.Activated(self)
  File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 1653, in Activated
    if FreeCAD.activeDraftCommand: FreeCAD.activeDraftCommand.finish()

'module' object has no attribute 'activeDraftCommand'Running the Python command 'Draft_Move' failed:
Traceback (most recent call last):
  File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 1693, in Activated
    Modifier.Activated(self)
  File "/Applications/FreeCAD.app/Contents/Mod/Draft/Draft.py", line 1653, in Activated
    if FreeCAD.activeDraftCommand: FreeCAD.activeDraftCommand.finish()

'module' object has no attribute 'activeDraftCommand'Call from Python thread (not synchronized): count=1
Call from Python thread (not synchronized): count=2
Call from Python thread (not synchronized): count=3
Call from Python thread (not synchronized): count=4
Call from Python thread (not synchronized): count=5
Call from Python thread (not synchronized): count=6
Call from Python thread (not synchronized): count=7
Call from Python thread (not synchronized): count=8
Call from Python thread (not synchronized): count=9
Call from Python thread (not synchronized): count=10
10
   Printing message
   Printing error
   Printing warning
Call from Python thread: count=1
Call from Python thread: count=2
Call from Python thread: count=3
Call from Python thread: count=4
Call from Python thread: count=5
Call from Python thread: count=6
Call from Python thread: count=7
Call from Python thread: count=8
Call from Python thread: count=9
Call from Python thread: count=10
10
Create instance of SphereCreator
TemplatePyModWorkbench::Activated()
TemplatePyModWorkbench::Deactivated()
Additional Informationdownloaded FreeCAD_i386_R2943.dmg on 2010-10-03

but:

>>> FreeCAD.Version()
['0', '10', '2862', <NULL>, 'https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk']
TagsNo tags attached.
FreeCAD Information

Activities

unauthenticated

2010-10-05 12:35

viewer   ~0000348

Last edited: 2010-10-05 12:45

As the error message says, you must have pyqt4 installed on your system for the draft module to run... Unfortunately I don't know much of Mac OSX, so it'll be hard for me to help...

There should be something on the forum about installing pyqt4 and pivy on mac, but I cannot find it back, I'll see if I can find the info for you.

But I should definitely do something so the Draft module doesn't load at all if any of the needed module is not present, so I'll keep this report open until I do that.

Yorik

gu1do

2010-10-05 13:08

reporter   ~0000349

Hi Yorik,

I already have PyQt4 installed with macports, and it's on my Python path:


$ python
Python 2.6.6 (r266:84292, Sep 18 2010, 13:51:33)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>> PyQt4.__path__
['/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4']

yorik

2010-10-08 00:41

administrator   ~0000354

That's weird,
Can you check if doing "import PyQt4" from the FreeCAD python interpreter (menu view->views->python console) works? It really looks like the pyqt4 module was not loaded (which is why the icons are not loaded)...

unauthenticated

2010-10-08 13:03

viewer   ~0000356

Hi Yorik,
Output from FreeCAD Python shell:


Python 2.6.6 (r266:84292, Sep 18 2010, 13:51:33)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> import PyQt4
>>> PyQt4.__path__
['/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4']
>>>


I'm happy to help debug. What should I do?

yorik

2010-10-09 13:26

administrator   ~0000358

That's really crazy... The error message you get on the first line really appears only if the module wasn't imported successfully...

And doing this works too?

from PyQt4 import QtGui, QtCore

unauthenticated

2010-10-11 20:56

viewer   ~0000365

Thanks Yorik, I should have tried that originally:

>>> from PyQt4 import QtGui, QtCore
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/QtGui.so, 2): no suitable image found. Did find:
    /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/QtGui.so: mach-o, but wrong architecture


I rebuilt macports' pyqt4 for both architectures:

sudo port upgrade --enforce-variants py26-pyqt4 +universal


But now, FreeCAD crashes on launch :(

2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] FreeCAD 0.10, Libs: 0.10R2862
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] (c) Juergen Riegel, Werner Mayer 2001-2009
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] ##### #### ### ####
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] # # # # # #
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] # ## #### #### # # # # #
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] #### # # # # # # # ##### # #
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] # # #### #### # # # # #
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] # # # # # # # # # ## ## ##
2010-10-11 6:41:14 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] # # #### #### ### # # #### ## ## ##
2010-10-11 6:41:15 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] Abnormal program termination...
2010-10-11 6:41:15 PM [0x0-0x8c08c].net.sourceforge.free-cad[96602] 
2010-10-11 6:41:15 PM com.apple.launchd.peruser.510[187] ([0x0-0x8c08c].net.sourceforge.free-cad[96602]) Exited with exit code: 3

yorik

2010-10-11 22:44

administrator   ~0000366

Hm I don't know much about mac, it'll be hard for me to help... On linux, "wrong architecture" usually means you are using a 32bits library on a 64bits system or vice-versa. But I suppose macports should handle that automatically?

Anyway, the draft module of freecad makes extensive use of pyqt4. So you really need a working pyqt4 to use it (you can always disable the draft module by deleting/moving away its folder)

Sorry I can't help you more, probably looking around for tips on installing pyqt4 you might find some clues. Maybe would be worth reinstalling all qt and pyqt?

yorik

2010-11-15 15:53

administrator   ~0000423

I'll close this bug report because there is not much that can be done on the freecad side, but don't hesitate to reopen it if needed.

Issue History

Date Modified Username Field Change
2010-10-03 14:49 gu1do New Issue
2010-10-05 07:06 wmayer Assigned To => yorik
2010-10-05 07:06 wmayer Status new => assigned
2010-10-05 12:35 unauthenticated Note Added: 0000348
2010-10-05 12:45 unauthenticated Note Edited: 0000348
2010-10-05 13:08 gu1do Note Added: 0000349
2010-10-08 00:41 yorik Note Added: 0000354
2010-10-08 13:03 unauthenticated Note Added: 0000356
2010-10-09 13:26 yorik Note Added: 0000358
2010-10-11 20:56 unauthenticated Note Added: 0000365
2010-10-11 22:44 yorik Note Added: 0000366
2010-11-15 15:53 yorik Note Added: 0000423
2010-11-15 15:53 yorik Status assigned => closed
2010-11-15 15:53 yorik Resolution open => won't fix
2010-11-15 15:53 yorik Fixed in Version => 0.11