Modify

Opened 16 years ago

Closed 12 years ago

#3966 closed defect (fixed)

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

Reported by: Bill5107 Owned by: Ryan J Ollos
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 12 years ago by Roman Kozlovskiy

Owner: changed from martinpaljak to Roman Kozlovskiy
Status: newassigned

comment:2 Changed 12 years ago by Roman Kozlovskiy

Owner: changed from Roman Kozlovskiy to Ryan J Ollos
Status: assignednew

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

comment:3 in reply to:  2 Changed 12 years ago by Ryan J Ollos

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 12 years ago by Ryan J Ollos

(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 Changed 12 years ago by Roman Kozlovskiy

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

comment:6 Changed 12 years ago by Ryan J Ollos

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

comment:7 in reply to:  5 Changed 12 years ago by Ryan J Ollos

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 12 years ago by Roman Kozlovskiy

Resolution: fixed
Status: newclosed

Thanks. Now all work fine

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.