Ticket #234 (closed defect: fixed)

Opened 7 years ago

AccountManager LoginModule fails with error "can't set attribute"

Reported by: Assigned to: Russ Brown mgood normal AccountManagerPlugin normal 0.10

Description

When using the LoginModule we get the following error when submitting the login form:

2006-03-22 01:21:32,264 Trac[main] ERROR: can't set attribute
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 283, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 143, in dispatch
req.authname = self.authenticate(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 126, in authenticate
authname = authenticator.authenticate(req)
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 160, in wrap
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 167, in authenticate
AttributeError: can't set attribute


I've had a quick look at the code myself but can't see anything obvious.

Change History

03/22/06 05:39:39 changed by mgood

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

(In [532]) req.remote_user can't be set as a property after the WSGI merge, so set it in the WSGI req.environ instead (fixes #234)

(follow-up: ↓ 3 ) 11/04/06 06:50:04 changed by r@robm.me.uk

• release set to 0.10.
• status changed from closed to reopened.
• resolution deleted.

I have this problem, too; not sure if it's the same cause but it's certainly the same error message and also occurs when logging in. This is with Trac 0.10.

Error message:

Traceback (most recent call last):
File "/home/robmiller/packages/lib/python2.3/site-packages/trac/web/main.py", line 356, in dispatch_request
dispatcher.dispatch(req)
File "/home/robmiller/packages/lib/python2.3/site-packages/trac/web/main.py", line 189, in dispatch
req.authname = self.authenticate(req)
File "/home/robmiller/packages/lib/python2.3/site-packages/trac/web/main.py", line 145, in authenticate
authname = authenticator.authenticate(req)
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 172, in wrap
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 181, in authenticate
AttributeError: can't set attribute


The only thing I can see is that I'm running Python 2.3 as opposed to 2.4—could that be a problem?

This happens when trying to log in with any user. When trying to register a new account, I get this message:

Traceback (most recent call last):
File "/home/robmiller/packages/lib/python2.3/site-packages/trac/web/main.py", line 356, in dispatch_request
dispatcher.dispatch(req)
File "/home/robmiller/packages/lib/python2.3/site-packages/trac/web/main.py", line 224, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 117, in process_request
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 150, in _do_create
File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 88, in set_password
File "build/bdist.linux-i686/egg/acct_mgr/htfile.py", line 63, in set_password
File "build/bdist.linux-i686/egg/acct_mgr/htfile.py", line 98, in _update_file
File "/home/robmiller/packages/lib/python2.3/fileinput.py", line 231, in next
File "/home/robmiller/packages/lib/python2.3/fileinput.py", line 300, in readline
os.rename(self._filename, self._backupfilename)
OSError: [Errno 16] Device or resource busy


(in reply to: ↑ 2 ) 11/04/06 06:54:46 changed by anonymous

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

I have this problem, too; not sure if it's the same cause but it's certainly the same error message and also occurs when logging in. This is with Trac 0.10.

There are two versions of the plugin: one for 0.9 and one for 0.10 and you've installed the 0.9 version. Check the installation instructions and install the 0.10 version instead.

11/04/06 08:01:37 changed by anonymous

Forgive my stupdity—I'm new to Trac—but how do I do this without access to the administration panel?

I've downloaded the "eggs" for WebAdmin and AccountManager, and run "easy_install" on them. I kill my fastcgi process, and now the link to log in is gone.

I poke around my config, and figure I should set the following line to enabled:

trac.web.auth.loginmodule = disabled


Which brings up the Login link, but when I click it I'm hit with the following error:

AssertionError: Authentication information not available.


Add/Change #234 (AccountManager LoginModule fails with error "can't set attribute")

Change Properties