strange error on first load of zope page
The first page I try and load after restarting the zserver invariably contains the following error. It always occurs *after* the page has successfully been rendered (I have added debugging so that I can see the path traversal, and SQL statements executed). Hitting reload will then display the page properly, and I won't see the error again until i restart the server. (The actual text from the html source is 'Cannot pickle <type 'module'> objects') It seems perfectly reasonable to me that you can't pickle a module, but what I'm having trouble understanding is why zope is trying to. Can anyone suggest a way that I could try and track down why this is happening? thanks, toby. =============================================================================== Zope has encountered an error while publishing this resource. Error Type: UnpickleableError Error Value: Cannot pickle objects ... Traceback (innermost last): File /export/home/toby/zope/Zope2/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /export/home/toby/zope/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish File /export/home/toby/zope/Zope2/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: proj) File /export/home/toby/zope/Zope2/lib/python/ZPublisher/Publish.py, line 175, in publish File /export/home/toby/zope/Zope2/lib/python/Zope/__init__.py, line 235, in commit File /export/home/toby/zope/Zope2/lib/python/ZODB/Transaction.py, line 251, in commit File /export/home/toby/zope/Zope2/lib/python/ZODB/Connection.py, line 349, in commit (Info: (('Products.ExternalMethod.ExternalMethod', 'ExternalMethod'), '\000\000\000\000\000\000\032 ', '')) UnpickleableError: (see above) -- [ Toby Sargeant : Inpharmatica : Developer : t.sargeant@inpharmatica.co.uk ] [ http://www.inpharmatica.co.uk : 020 7631 4644 fax 020 7631 4844 ]
[Toby Sargeant] | It seems perfectly reasonable to me that you can't pickle a module, but what | I'm having trouble understanding is why zope is trying to. Can anyone suggest | a way that I could try and track down why this is happening? My guess is that you've got a packaged module, in the same directory as your external method. I.e., if your external module does an 'import somemodule', and you've got a 'module.py'-file and a 'module'-directory, you'll get this error.. (because python loads package-like modules first). HTH. -Morten
participants (2)
-
morten@esol.no -
Toby Sargeant