Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1122 closed defect (duplicate)

AttributeError in

Reported by: Chriki TM Owned by: Matt Good
Priority: high Component: AccountManagerPlugin
Severity: blocker Keywords: AttributeError
Cc: Trac Release: 0.10



I believe, I've found a bug in the AccountManagerPlugin. Unfortunately I have no Python experience at all. But having a look at the code shows that in the authenticate method of the LoginModule class in the line

req.remote_user = self._remote_user(req)

is wrong. req is a property for a managed attribute. In trac.web.api.Request this property has no setter function assigned which results in the error.

Here's a traceback of the error:

15:42:33 Trac[main] ERROR: can't set attribute
Traceback (most recent call last):
  File "C:\Program Files\Python24\lib\site-packages\trac\web\", line 387, in dispatch_request
  File "C:\Program Files\Python24\lib\site-packages\trac\web\", line 182, in dispatch
    req.authname = self.authenticate(req)
  File "C:\Program Files\Python24\lib\site-packages\trac\web\", line 146, in authenticate
    authname = authenticator.authenticate(req)
  File "build\bdist.win32\egg\acct_mgr\", line 186, in wrap
  File "build\bdist.win32\egg\acct_mgr\", line 195, in authenticate
AttributeError: can't set attribute

I'm using trac 0.10.3 and the AccountManagerPlugin with revision 1887 of the SVN repository.

Chriki TM

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by Matt Good

Resolution: duplicate
Status: newclosed
Summary: {{{AttributeError}}} in {{{}}}AttributeError in

This is a duplicate of #234

You appear to be using the AccountManager from the "0.9" branch which will not work on Trac 0.10. You'll need to download the plugin from the "0.10" branch instead.

comment:2 Changed 16 years ago by Chriki TM


thanks very much, I really had used the wrong branch. It all works properly now with the "0.10" branch.

Cheers, Chriki TM

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Matt Good.
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.