Ticket #3966 (closed defect: fixed)

Opened 5 years ago

Last modified 1 year ago

import error in wsgiplugin.py of trac.web.main._open_environment

Reported by: Bill5107 Assigned to: rjollos
Priority: normal Component: TracWsgiPlugin
Severity: normal Keywords: trac wsgi
Cc: william.rivet@pw.utc.com Trac Release: 0.10

Description

The zipfile from http://trac-hacks.org/wiki/TracWsgiPlugin did not work out of the box for me:

...
File "c:\virtualenv\lib\site-packages\wsgitrac-0.3dev-py2.5.egg\wsgiplugin\wsgiplugin.py", line 15, in <module>
    from trac.web.main import dispatch_request, _open_environment
ImportError: cannot import name _open_environment

I simply removed the leading "_" in _open_environment in trac/web/main.py, which seemed to work for me.

Attachments

Change History

05/30/12 15:02:59 changed by kroman0

  • status changed from new to assigned.
  • owner changed from martinpaljak to kroman0.

(follow-up: ↓ 3 ) 05/30/12 15:15:01 changed by kroman0

  • status changed from assigned to new.
  • owner changed from kroman0 to rjollos.

Please, give me write access to subversion to commit fix for TracWsgiPlugin. Thanks

(in reply to: ↑ 2 ) 05/30/12 21:39:57 changed by rjollos

Replying to kroman0:

Please, give me write access to subversion to commit fix for TracWsgiPlugin. Thanks

I'd be happy to give you access, but the policy is to follow the steps in AdoptingHacks. In the meantime, please let me know if the next check-in resolves the issues for you.

05/30/12 21:48:29 changed by rjollos

(In [11607]) Refs #3966: Fixed incorrect package import (trac.web.main._open_environment existed in Trac 0.10, but does not exist in 0.11).

(follow-up: ↓ 7 ) 05/31/12 10:16:33 changed by kroman0

Please also change _open_environment to open_environment in http://trac-hacks.org/browser/tracwsgiplugin/0.11/wsgiplugin/wsgiplugin.py#L89

05/31/12 17:02:42 changed by rjollos

(In [11608]) Refs #3966: Part of [11607] - Replaced calls to _open_environment with open_environment.

(in reply to: ↑ 5 ) 05/31/12 17:03:19 changed by rjollos

Replying to kroman0:

Please also change _open_environment to open_environment in http://trac-hacks.org/browser/tracwsgiplugin/0.11/wsgiplugin/wsgiplugin.py#L89

Thanks. Stupid oversight on my part.

05/31/12 17:12:45 changed by kroman0

  • status changed from new to closed.
  • resolution set to fixed.

Thanks. Now all work fine


Add/Change #3966 (import error in wsgiplugin.py of trac.web.main._open_environment)




Change Properties
Action