NameError: name 'OverflowWarning' is not defined

Bug #181529 reported by goibhniu
6
Affects Status Importance Assigned to Milestone
zopeproject
Won't Fix
Undecided
Unassigned

Bug Description

This isn't really a bug, but the documentation on http://pypi.python.org/pypi/zopeproject could probably mention it.
If python 2.5 is the default on the system (e.g. on Ubuntu 7.10) zopeproject should be installed with
easy_install-2.4 zopeproject
to ensure it uses python2.4 otherwise it installs fine but gives the following error when run with
./bin/paster serve deploy.ini
NameError: name 'OverflowWarning' is not defined

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 181529] NameError: name 'OverflowWarning' is not defined

This isn't entirely correct. zopeproject has no known incompatibility
with Python 2.5. It itself doesn't use OverflowWarning. But something
in the Zope eggs that zopeproject installs probably uses it. Hence the
zopeproject call doesn't yield the exception. The paster call that
starts the application does. This is a bug of one of the Zope eggs.
The exact traceback would help singling out which one. Last time I
checked, though, Zope 3 would work perfectly on Python 2.5, as long as
it wasn't a Linux 64bit system.

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

Zope 3 should work well on Python 2.5 now, especially since Shane fixed the remaining bugs in the C code: https://bugs.launchpad.net/zope3/+bug/248380.

Changed in zopeproject:
status: New → Won't Fix
Revision history for this message
Nathan R. Yergler (nyergler) wrote :

We're not actively developing or supporting ccPublisher these days.

Changed in ccpublisher:
status: New → Won't Fix
Revision history for this message
Austin Lund (austin-lund) wrote :
Download full text (3.6 KiB)

This is the traceback I got. But I am using a 64 bit system:

lund@lund-laptop:~/src/ZOPE3/tests/HelloWorld$ bin/paster serve deploy.ini
Traceback (most recent call last):
  File "bin/paster", line 106, in <module>
    paste.script.command.run()
  File "/home/lund/src/buildout-eggs/PasteScript-1.6.3-py2.5.egg/paste/script/command.py", line 79, in run
    invoke(command, command_name, options, args[1:])
  File "/home/lund/src/buildout-eggs/PasteScript-1.6.3-py2.5.egg/paste/script/command.py", line 118, in invoke
    exit_code = runner.run(args)
  File "/home/lund/src/buildout-eggs/PasteScript-1.6.3-py2.5.egg/paste/script/command.py", line 213, in run
    result = self.command()
  File "/home/lund/src/buildout-eggs/PasteScript-1.6.3-py2.5.egg/paste/script/serve.py", line 251, in command
    relative_to=base, global_conf=vars)
  File "/home/lund/src/buildout-eggs/PasteScript-1.6.3-py2.5.egg/paste/script/serve.py", line 278, in loadapp
    **kw)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 204, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 224, in loadobj
    global_conf=global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 278, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 409, in get_context
    section)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 431, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 361, in get_context
    global_conf=global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 285, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 561, in get_context
    object_type, name=name)
  File "/home/lund/src/buildout-eggs/PasteDeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py", line 587, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/lund/src/ZOPE3/tests/HelloWorld/src/helloworld/startup.py", line 5, in <module>
    import zope.app.wsgi
  File "/home/lund/src/buildout-eggs/zope.app.wsgi-3.4.1-py2.5.egg/zope/app/wsgi/__init__.py", line 25, in <module>
    from zope.publisher.publish import publish
  File "/home/lund/src/buildout-eggs/zope.publisher-3.5.4-py2.5.egg/zope/publ...

Read more...

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 181529] Re: NameError: name 'OverflowWarning' is not defined

El 26 Sep 2008, a las 08:32 , Austin Lund escribió:
> This is the traceback I got. But I am using a 64 bit system:
>
> lund@lund-laptop:~/src/ZOPE3/tests/HelloWorld$ bin/paster serve
> deploy.ini
> Traceback (most recent call last):
> ...
> File "/home/lund/src/buildout-eggs/zope.publisher-3.5.4-py2.5.egg/
> zope/publisher/interfaces/__init__.py", line 30, in <module>
> from zope.interface.common.interfaces import IException,
> ILookupError
> File "/usr/lib/python2.5/site-packages/zope/interface/common/
> interfaces.py", line 80, in <module>
> classImplements(OverflowWarning, IOverflowWarning)
> NameError: name 'OverflowWarning' is not defined

If you look carefully at the traceback, you'll notice that nearly all
code lives in eggs under /home/lund/src/buildout-eggs *except* for
zope.interface which lives in your Python 2.5 site packages. So it
looks like you installed a ancient version of zope.interface into your
site-packages that's incomatible with Python 2.5. Unfortunately,
buildout by default picks it up instead of downloading a more recent
version.

SO this isn't a bug in zopeproject or zope.interface. You're just
using an outdated version of it. You have two options:

a) remove zope.interface from site-packages (probably your package
manage installed it there, so you should use it to uninstall it again)

b) require in your buildout a more recent zope.interface version
(zope.interface >= 3.4.1)

Revision history for this message
Austin Lund (austin-lund) wrote :

Indeed. My distro packages were being chosen over my local packages. Just needed to rearrange my python path.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.