[Zope] Should I switch to Python 1.5.2?
Kyler B. Laird
laird@ecn.purdue.edu
Sat, 10 Feb 2001 14:48:28 -0500
On Sat, 10 Feb 2001 14:40:55 +0100 (CET) you wrote:
>Kyler B. Laird writes:
> >
> > I've been using Python 2.0 with Zope 2.3.0.
> > It generally works well, but lately I've
> > run into problems using string.split() and
> > now I notice that httplib encounters a
> > similar ("loop over non-sequence") problem.
>I suggest, we flesh out these problems.
>
>Tracebacks are a must for this task.
Sorry; looking back over the archives, I see that
my original post about this might not have made
it to the public. Hmmmm...
For the Script (Python)
import string
foo = string.split('This is a test...', ' ')
return foo
I get
Error Type: TypeError
Error Value: loop over non-sequence
Traceback (innermost last):
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish
File /var/www/Zope/Zope-2.3.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook
(Object: Traversable)
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 171, in publish
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: split)
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: split)
File /var/www/Zope/Zope-2.3.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__
(Object: split)
File /var/www/Zope/Zope-2.3.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 353, in _bindAndExec
(Object: split)
File /var/www/Zope/Zope-2.3.0-src/lib/python/Products/PythonScripts/PythonScript.py, line 330, in _exec
(Object: split)
(Info: ({'script': <PythonScript instance at d4a7f0>, 'context': <Folder instance at cc3d90>, 'container': <Folder instance at cc3d90>, 'traverse_subpath': []}, (), {}, None))
File Script (Python), line 2, in split
File /var/www/Zope/Zope-2.3.0-src/lib/python/Products/PythonScripts/Guarded.py, line 220, in __careful_import__
TypeError: (see above)
Changing to
foo = [] + string.split('This is a test...', ' ')
eliminates the error, but I don't know what to do
about
import httplib
h = httplib.HTTP('yyy.zope.org')
Traceback (innermost last):
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish
File /var/www/Zope/Zope-2.3.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook
(Object: Traversable)
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 171, in publish
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: index_html)
File /var/www/Zope/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: index_html)
File /var/www/Zope/Zope-2.3.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__
(Object: index_html)
File /var/www/Zope/Zope-2.3.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 353, in _bindAndExec
(Object: index_html)
File /var/www/Zope/Zope-2.3.0-src/lib/python/Products/PythonScripts/PythonScript.py, line 330, in _exec
(Object: index_html)
(Info: ({'script': <PythonScript instance at d5e030>, 'context': <Folder instance at cc42e0>, 'container': <Folder instance at cc42e0>, 'traverse_subpath': []}, (), {}, None))
File Script (Python), line 2, in index_html
File /var/www/Zope/Zope-2.3.0-src/lib/python/Products/PythonScripts/Guarded.py, line 220, in __careful_import__
TypeError: (see above)
Thanks.
--kyler