Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2492 (closed documentation: migrated)

Opened 9 years ago

Last modified 8 years ago

installing a TG2 project as an egg file throws "OSError: [Errno 20] Not a directory" on every request

Reported by: diefans Owned by:
Priority: normal Milestone: 2.1 docs
Component: TurboGears Version: 2.1
Severity: normal Keywords: deploy egg-file OSError
Cc:

Description

When I install a TG2 project egg via easy_install in a fresh virtualenv with a fresh TG2 setup the application throws the following exception on every request:

URL: http://localhost:8080/
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/WebError-0.10.1-py2.6.egg/weberror/evalexception.py', line 431 in respond
  app_iter = self.application(environ, detect_start_response)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/TurboGears2-2.1b2-py2.6.egg/tg/configuration.py', line 783 in remover
  return app(environ, start_response)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/repoze.tm2-1.0a5-py2.6.egg/repoze/tm/__init__.py', line 23 in __call__
  result = self.application(environ, save_status_and_headers)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/repoze.who-1.0.18-py2.6.egg/repoze/who/middleware.py', line 107 in __call__
  app_iter = app(environ, wrapper.wrap_start_response)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/ToscaWidgets-0.9.9-py2.6.egg/tw/core/middleware.py', line 43 in __call__
  return self.wsgi_app(environ, start_response)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/ToscaWidgets-0.9.9-py2.6.egg/tw/core/middleware.py', line 68 in wsgi_app
  resp = req.get_response(self.application)
File 'build/bdist.linux-x86_64/egg/webob/request.py', line 919 in get_response
File 'build/bdist.linux-x86_64/egg/webob/request.py', line 887 in call_application
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/ToscaWidgets-0.9.9-py2.6.egg/tw/core/resource_injector.py', line 68 in _injector
  resp = req.get_response(app)
File 'build/bdist.linux-x86_64/egg/webob/request.py', line 919 in get_response
File 'build/bdist.linux-x86_64/egg/webob/request.py', line 887 in call_application
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Beaker-1.5.2-py2.6.egg/beaker/middleware.py', line 73 in __call__
  return self.app(environ, start_response)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Beaker-1.5.2-py2.6.egg/beaker/middleware.py', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/middleware.py', line 80 in __call__
  config.environ = environ
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/__init__.py', line 22 in __setattr__
  self.load_wsgi_environ(value)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/__init__.py', line 51 in load_wsgi_environ
  result = mapper.routematch(path)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/mapper.py', line 690 in routematch
  result = self._match(url, environ)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/mapper.py', line 609 in _match
  self.create_regs()
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/mapper.py', line 560 in create_regs
  self._create_regs(*args, **kwargs)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/mapper.py', line 568 in _create_regs
  clist = self.controller_scan(self.directory)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/util.py', line 494 in controller_scan
  controllers = find_controllers(directory)
File '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/Routes-1.12-py2.6.egg/routes/util.py', line 482 in find_controllers
  for fname in os.listdir(dirname):
OSError: [Errno 20] Not a directory: '/home/code/virtualenvs/tg_test2/lib/python2.6/site-packages/tg_test-0.1dev-py2.6.egg/tg_test/controllers'

this is not necessary an error (looks like intended), but as far as I know it is not documented to deploy TG2 in an unzipped form.

when I install the project with easy_install -Z <TG2.egg> everything is fine

Change History

comment:1 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 2.1rc1

comment:2 Changed 9 years ago by pedersen

  • Milestone changed from 2.1rc1 to 2.1 docs

Changing milestone to tg2.1 docs. This is definitely a documentation issue. We should also include *why* to only deploy in an unzipped fashion.

comment:3 Changed 8 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.