i downloaded and installed PythonOCC like written on the pythonOCC homepage and with simply testing :
from OCC import *
i got this error:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
from OCC import *
File "C:\Python26\lib\site-packages\OCC\Standard.py", line 28, in <module>
_Standard = swig_import_helper()
File "C:\Python26\lib\site-packages\OCC\Standard.py", line 27, in swig_import_helper
return _mod
UnboundLocalError: local variable '_mod' referenced before assignment
i already searched for help a lot of places, but found nothing. I think there is an error in load_module, cause on removing try and finally commands i get another error about a wrong dll version. I reached my horizon and hope someone can help me with this.
Thanks a lot
jelle
2009/11/03 16:37
> i already searched for help a lot of places
Well, you didn't find pythonocc.org ;') ( the pythonocc.org mailing list is a more appropriate place to talk pythonocc )
Have a look at the ( many ) samples that come with pythonocc!
The samples do provide you a great place to get familiar with pythonocc.
You'll see in the examples that you should import a submodule of the OCC module ( OCC is _huge_ you don't want to import it all at once ). So try "from OCC.gp import * " than you will find gp_Pnt for example.
This error generally occurs when shared libraries (.DLL if you run Windows) cannot be loaded (whether they're not in your PATH or there are linkage issues). According to the traceback, you run Python26 on Windows. I suggest you download/install the 'all_in_one' package for pythonOCC-0.3.
Best Regards,
Thomas
Heil
2009/11/04 16:20
thanks for help all,
i've found the pythonocc.org page ;) but it was a windows problem ... after admin reinstallation everything works well ...