I have been writing a python C++ extension that makes use of Intel's open computer vision library. I have been experiencing a bizarre problem.
When I attempt to run my module:
import cvdemo
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No such file or directory
I have found though that this will only occur when my c++ actually makes a call to opencv functions. If I comment all of those functions out, the module will be correctly imported (and I can execute all functions within it).
Literally, everything works fine until a line like:
cvDestroyWindow("result");
or:
cvNamedWindow( "result", 1 );
or: matrix= cvLoad( matrix_name, 0, 0, 0 );
is in the code.
Given how lacking in information python's import error is, I have no idea what is going on here. No compile errors are given either.
Please advise, Aaron Staley
Try running with the program strace and analyze the output. That often helps.
2008/7/4 Aaron Staley astaley@berkeley.edu:
I have been writing a python C++ extension that makes use of Intel's open computer vision library. I have been experiencing a bizarre problem.
When I attempt to run my module:
import cvdemo
Traceback (most recent call last):
File "<stdin>", line 1, in <module> ImportError: No such file or directory
I have found though that this will only occur when my c++ actually makes a call to opencv functions. If I comment all of those functions out, the module will be correctly imported (and I can execute all functions within it).
Literally, everything works fine until a line like:
cvDestroyWindow("result");
or:
cvNamedWindow( "result", 1 );
or: matrix= cvLoad( matrix_name, 0, 0, 0 );
is in the code.
Given how lacking in information python's import error is, I have no idea what is going on here. No compile errors are given either.
Please advise, Aaron Staley
capi-sig mailing list capi-sig@python.org http://mail.python.org/mailman/listinfo/capi-sig
Thanks for the advice. After a few more hours of work, I solved the problem.
Some comments:
fail to load. The traces were showing this error:
1042 346460 [main] python 4240 seterrno_from_win_error:
/ext/build/netrel/src/cygwin-1.5.25-15/winsup/cygwin/dlfcn.cc:103
windows error 126
(DLL failed to load due to missing files)
If just the system error code was printed out it would have helped a lot.
that doesn't exist in windows XP. See comments at http://techmale.com/2008/02/27/how-microsoft-caused-apache-php_mysqldll-to-f...
Gustavo Carneiro wrote:
Try running with the program strace and analyze the output. That often helps.
2008/7/4 Aaron Staley <astaley@berkeley.edu mailto:astaley@berkeley.edu>:
I have been writing a python C++ extension that makes use of Intel's open computer vision library. I have been experiencing a bizarre problem. When I attempt to run my module: import cvdemo Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No such file or directory I have found though that this will only occur when my c++ actually makes a call to opencv functions. If I comment all of those functions out, the module will be correctly imported (and I can execute all functions within it). Literally, everything works fine until a line like: cvDestroyWindow("result"); or: cvNamedWindow( "result", 1 ); or: matrix= cvLoad( matrix_name, 0, 0, 0 ); is in the code. Given how lacking in information python's import error is, I have no idea what is going on here. No compile errors are given either. Please advise, Aaron Staley _______________________________________________ capi-sig mailing list capi-sig@python.org <mailto:capi-sig@python.org> http://mail.python.org/mailman/listinfo/capi-sig
-- Gustavo J. A. M. Carneiro INESC Porto, Telecommunications and Multimedia Unit "The universe is always one step beyond logic." -- Frank Herbert