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 )

Reply via email to