Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#309 closed defect (worksforme)

Accountmanagerplugin error: when enabling the loginmodule

Reported by: akshay.guleria@… Owned by: mgood
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.9


i get the following error when i try to login with valid login credentials on my newly setup trac:

Trac detected an internal error:

'ModPythonRequest' object has no attribute 'environ'
Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/web/", line 206, in handler

dispatch_request(mpr.path_info, mpr, env)

File "/usr/lib/python2.3/site-packages/trac/web/", line 139, in dispatch_request


File "/usr/lib/python2.3/site-packages/trac/web/", line 79, in dispatch

req.authname = self.authenticate(req)

File "/usr/lib/python2.3/site-packages/trac/web/", line 66, in authenticate

authname = authenticator.authenticate(req)

File "build/bdist.linux-i686/egg/acct_mgr/", line 160, in wrap
File "build/bdist.linux-i686/egg/acct_mgr/", line 167, in authenticate

AttributeError: 'ModPythonRequest' object has no attribute 'environ'

This error comes as soon as i enable the following line in trac.ini:
acct_mgr.web_ui.loginmodule = enabled

if i disable it, i can use the in-built trac login module and everything works except accountmanagerplugin. I can even switch to form based login and authenticate if i want.
here is the relevant trac.ini:
webadmin.* = enabled
acct_mgr.web_ui.registrationmodule = disabled
acct_mgr.web_ui.loginmodule = enabled
trac.web.auth.loginmodule = disabled
acct_mgr.api.accountmanager = enabled
acct_mgr.web_ui.accountmodule = enabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.htfile.abstractpasswordfilestore = enabled

password_format = htpasswd
password_file = /media/repo/TRAC/trac.htpasswd

And here is the current apache config for trac:
<Location "/UNIX_Solutions">

SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /media/repo/TRAC/UNIX_Solutions
SetEnv PYTHON_EGG_CACHE /tmp/.python-cache

# PythonOption TracUriRoot /projects/myproject

# i have commented the following. because if i enable this, the regular htpasswd authentication starts to work.
#<Location "/UNIX_Solutions/login">
# AuthType Basic
# AuthName "UNIX Solutions Restricted Access"
# AuthUserFile /media/repo/TRAC/trac.htpasswd
# Require valid-user

# This is needed for authform
#Redirect /login http://silinux1/UNIX_Solutions/login

Hope you can help.


Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by mgood

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

You're trying to use the "trunk" version of the AccountManangerPlugin on Trac 0.9. This will not work. You need to use the plugin from the "0.9" folder.

comment:2 Changed 8 years ago by akshay.guleria@…

thanks much. that worked.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.