[zope2-tracker] [Bug 1412015] [NEW] NameError: global name 'WindowsError' is not defined

Ryne Everett ryneeverett at gmail.com
Sat Jan 17 18:28:43 CET 2015

Public bug reported:

I'm using Plone on linux, and keep getting the following traceback:

Traceback (most recent call last):
  File "/usr/local/Plone/zinstance/parts/instance/bin/interpreter", line 293, in <module>
    exec(compile(__file__f.read(), __file__, "exec"))
  File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
  File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/run.py", line 22, in run
  File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/__init__.py", line 83, in prepare
  File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/__init__.py", line 286, in makeLockFile
    except (IOError, WindowsError):
NameError: global name 'WindowsError' is not defined

WindowsError is used only twice in the project, both times in that file.
I know of two ways this could be fixed:

1. Use the more general OSError, from which WindowsError inherits.
2. Use this pattern at the module scope, which you can find in the standard library's shutil module:

except NameError:
    WindowsError = None

** Affects: zope2
     Importance: Undecided
         Status: New

You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.

  NameError: global name 'WindowsError' is not defined

To manage notifications about this bug go to:

More information about the zope2-tracker mailing list