Modify

Opened 6 years ago

Closed 3 years ago

#3966 closed defect (fixed)

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

Reported by: Bill5107 Owned by: rjollos
Priority: normal Component: TracWsgiPlugin
Severity: normal Keywords: trac wsgi
Cc: william.rivet@… 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 (0)

Change History (8)

comment:1 Changed 3 years ago by kroman0

  • Owner changed from martinpaljak to kroman0
  • Status changed from new to assigned

comment:2 follow-up: Changed 3 years ago by kroman0

  • Owner changed from kroman0 to rjollos
  • Status changed from assigned to new

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

comment:3 in reply to: ↑ 2 Changed 3 years ago 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.

comment:4 Changed 3 years ago 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).

comment:5 follow-up: Changed 3 years ago by kroman0

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

comment:6 Changed 3 years ago by rjollos

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

comment:7 in reply to: ↑ 5 Changed 3 years ago 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.

comment:8 Changed 3 years ago by kroman0

  • Resolution set to fixed
  • Status changed from new to closed

Thanks. Now all work fine

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.