Dylan wrote on Friday, February 28, 2003, 12:06:00 PM:
It might be a permissions issue. Is Zope running as a service?
Nice to get all these suggestions from you and Stefan. Zope was not running as a service (for development i run it manually so i can see any stdout/stderr more easily), but i just tried it as a service with the same results (it doesn't work). This XP box has just one account with full Administrator privileges (yeah, bad, i know).
If that doesn't straighten things out, could you provide a snip of the code that works at the CLI but doesn't work in your product and any traceback you're getting?
There's not much code to show. But I'll be happy to give a complete report below for anyone willing to spare valuable time to look at it. Trying to isolate the problem, i made things as minimal as possible. The following few lines are a module which runs fine from the CLI, but when in my tiny little minimal product import this module and call the function ... it doesn't work. It's the call to Device() that fails. --- vidtest.py --- from VideoCapture import Device def getdev(): cam = Device(devnum=0) return cam if __name__ == '__main__': print getdev() ---end of vidtest.py---
From the command line:
"h:\Program Files\ozope\bin\python.exe" vidtest.py <VideoCapture.Device instance at 008800BC>
Now here is the zope product test method: def test(self): "public" import vidtest return vidtest.getdev() Results from zope: Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.ZVideoCapture.ZVideoCapture, line 32, in test Module Products.ZVideoCapture.vidtest, line 4, in getdev Module VideoCapture, line 49, in __init__ Error: Creation of the filter graph failed. -- Tim Middleton | Cain Gang Ltd | Then suddenly, for no apparent reason, the x@veX.net | www.Vex.Net | unpitying orchestra struck up a polka. -D