Ticket #4193 defect closed duplicate

Opened 4 years ago

Last modified 4 years ago

NameError: global name 'FilePath' is not defined

Reported by: thijs Owned by: jml
Priority: normal Milestone:
Component: trial Keywords:
Cc: thijs Branch:
Author: Launchpad Bug:


Was getting this error:

$ python setup.py test
running test
running egg_info
writing requirements to PyAMF.egg-info/requires.txt
writing PyAMF.egg-info/PKG-INFO
writing top-level names to PyAMF.egg-info/top_level.txt
writing dependency_links to PyAMF.egg-info/dependency_links.txt
writing manifest file 'PyAMF.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-2.6/cpyamf/util.so -> cpyamf
copying build/lib.linux-x86_64-2.6/cpyamf/amf3.so -> cpyamf
could not remove FilePath('/home/thijs/pyamf/_trial_temp'), caught OSError [Errno 13]: Permission denied
Traceback (most recent call last):
  File "setup.py", line 186, in <module>
    "Topic :: Software Development :: Libraries :: Python Modules",
  File "/usr/local/lib/python2.6/distutils/core.py", line 152, in setup
  File "/usr/local/lib/python2.6/distutils/dist.py", line 975, in run_commands
  File "/usr/local/lib/python2.6/distutils/dist.py", line 995, in run_command
  File "/usr/local/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/test.py", line 121, in run
  File "/usr/local/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/test.py", line 101, in with_project_on_sys_path
  File "setup.py", line 36, in run_tests
    return self.run_twisted()
  File "setup.py", line 26, in run_twisted
    return r.run(suite())
  File "/usr/local/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/trial/runner.py", line 833, in run
    return self._runWithoutDecoration(test)
  File "/usr/local/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/trial/runner.py", line 859, in _runWithoutDecoration
    oldDir = self._setUpTestdir()
  File "/usr/local/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/trial/runner.py", line 753, in _setUpTestdir
  File "/usr/local/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/trial/runner.py", line 728, in _removeSafely
    newPath = FilePath('_trial_temp_old%s'
NameError: global name 'FilePath' is not defined

Which starts out as a permission problem, which is ok, but turns into a NameError. FilePath should be file.FilePath in trunk/twisted/trial/runner.py#L728

Change History


Changed 4 years ago by exarkun

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #4020

Note: See TracTickets for help on using tickets.