Op 31-10-11 10:29, Mike Metcalfe schreef:
Hi,
I'm maintaining a Plone 3.3.5 add-on product that now needs to take a
photo with a webcam. The python package I'd like to use is python-opencv
which is only available for python 2.6. I created a script to take the
photo which works when called from a terminal. But when I call it from
inside plone with os.subprocess (or system) I get a Python C API version
mismatch RuntimeWarning and "NameError: name 'OverflowWarning' is not
defined". Any ideas of how I can prevent this? Or should I rather find a
python 2.4 package instead.
BTW, I initially used a javascript product (jpegcam) to take a photo but
I couldn't get a decent quality photo.
A few thoughts:
- Are you explicitly calling python2.6 in your os.subprocess call? Or
does the script itself have something like '#! /usr/bin/env python2.6'?
- Are you sure the same python is used when executing the script as when
calling if from the command line? And not maybe a local python in one
case and a globally installed python in the second case?
- Put a pdb in the script and see what you can find out from there.
--
Maurits van Rees http://maurits.vanrees.org/
Web App Programmer at Zest Software: http://zestsoftware.nl
"Logical thinking shows conclusively that logical thinking
is inconclusive." - My summary of Gödel, Escher, Bach
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers