Re: [Zope] External Method cPickle Import Module Error
Sean W. Duffy wrote at 2006-12-27 19:44 -0600: ... I have upgraded from Zope 2.8.5 to 2.9.4. This currently works in the 2.8.5 instance but not in the 2.9.4. I have a Module Progress in /usr/lib/python2.4/site-packages/Progress containing 4 files: __init__.py __init__.pyc Progress.py Progress.pyc Both instances have calls to neuro.py which includes: from Progress import Progress The External Method in both instances looks good. I even updated the External Method by clicking the Save Changes button without error in the new 294 instance. But when I access it from the dtml-method it goes boom: Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('/var/lib/hip_294_251/Extensions/neuro.py', 'neuro') Module /var/lib/hip_294_251/Extensions/neuro.py, line 299, in ? Module /var/lib/hip_294_251/Extensions/neuro.py, line 9, in GetProgress ImportError: No module named Progress But Progress is in: /usr/lib/python2.4/site-packages/Progress ! If I just start python at the command line I can import Progress w/o error. I'm guessing that it has something to do with how cPickle is sandboxed by Zope, but I just don't get it. It does not look like a Zope (version) issue: The import in an External Method is a pure Python import -- without any restrictions or additional magic. Therefore, if sys.path is still correct inside the External Method, all modules/packages reachable by sys.path should be importable. I would check sys.path. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] External Method cPickle Import Module Error
Hi, I have upgraded from Zope 2.8.5 to 2.9.4. This currently works in the 2.8.5 instance but not in the 2.9.4. I have a Module Progress in /usr/lib/python2.4/site-packages/Progress containing 4 files: __init__.py __init__.pyc Progress.py Progress.pyc Both instances have calls to neuro.py which includes: from Progress import Progress The External Method in both instances looks good. I even updated the External Method by clicking the Save Changes button without error in the new 294 instance. But when I access it from the dtml-method it goes boom: Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('/var/lib/hip_294_251/Extensions/neuro.py', 'neuro') Module /var/lib/hip_294_251/Extensions/neuro.py, line 299, in ? Module /var/lib/hip_294_251/Extensions/neuro.py, line 9, in GetProgress ImportError: No module named Progress But Progress is in: /usr/lib/python2.4/site-packages/Progress ! If I just start python at the command line I can import Progress w/o error. I'm guessing that it has something to do with how cPickle is sandboxed by Zope, but I just don't get it. Any guidance sincerely appreciated, Sean Debug information: # Zope version: (Zope 2.9.4-final, python 2.4.3, linux2) # Python version: 2.4.3 (#1, Jun 13 2006, 16:41:18) [GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] # System Platform: linux2 # SOFTWARE_HOME: /var/lib/zope294/lib/python # INSTANCE_HOME: /var/lib/hip_294_251 # CLIENT_HOME: /var/lib/hip_294_251/var # Process ID: 2507 (-1256522832) # Running for: 19 min 17 sec # sys.path: /var/lib/hip_294_251/lib/python /var/lib/hip_294_251/lib/python /var/lib/zope294/lib/python/Zope2/Startup /var/lib/hip_294_251/Products/ATContentTypes/thirdparty /var/lib/zope294/lib/python /usr/lib/python24.zip /usr/lib/python2.4 /usr/lib/python2.4/plat-linux2 /usr/lib/python2.4/lib-tk /usr/lib/python2.4/lib-dynload /usr/lib/python2.4/site-packages /usr/lib/python2.4/site-packages/Numeric /usr/lib/python2.4/site-packages/PIL /usr/lib/python2.4/site-packages/gtk-2.0 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] External Method cPickle Import Module Error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 27. Dezember 2006 19:44:24 -0600 Sean W. Duffy [EMAIL PROTECTED] wrote: Hi, I have upgraded from Zope 2.8.5 to 2.9.4. This currently works in the 2.8.5 instance but not in the 2.9.4. I have a Module Progress in /usr/lib/python2.4/site-packages/Progress containing 4 files: __init__.py __init__.pyc Progress.py Progress.pyc Both instances have calls to neuro.py which includes: from Progress import Progress The External Method in both instances looks good. I even updated the External Method by clicking the Save Changes button without error in the new 294 instance. But when I access it from the dtml-method it goes boom: Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('/var/lib/hip_294_251/Extensions/neuro.py', 'neuro') Module /var/lib/hip_294_251/Extensions/neuro.py, line 299, in ? Module /var/lib/hip_294_251/Extensions/neuro.py, line 9, in GetProgress ImportError: No module named Progress But Progress is in: /usr/lib/python2.4/site-packages/Progress ! If I just start python at the command line I can import Progress w/o error. I'm guessing that it has something to do with how cPickle is sandboxed by Zope, but I just don't get it. I don't see any indication for a cPickle issue. *Trible* check that your Zope instance use the system Python installationl. Check your file permissions, check sys.path, check your $PYTHONPATH. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFk3KQCJIWIbr9KYwRAlcKAKDL0t0qSQFkau++QkcCFXzxVHNbxgCggpG3 ySS1E+jhamd0mLwC+fnvhlM= =ZveC -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )