Opened 7 years ago

Closed 7 years ago

#9108 closed defect (fixed)

TypeError: 'NoneType' object is not iterable

Reported by: vb2807@… Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: TypeError admin web_ui
Cc: vb2807@… Trac Release: 0.11


I installed Trac 0.12.2, installed TracAccountManager 0.3.1 (using easy_install). The attached screenshot has the components enabled.

After the above steps are done the Accounts->Configuration, Accounts->Account Details, Accounts->Users are visible in the Admin panel.

However, when I click on Accounts->Account Details, Accounts->Users then I get "Trac detected an internal error: TypeError: 'NoneType' object is not iterable". Refer to the attached screenshots (two screenshots for the same screen because a single screenshot was not able to capture the complete page).

Is there a fix available for the above issue? Or, is it something which I am doing incorrectly?

Please advise.


Attachments (0)

Change History (7)

comment:1 Changed 7 years ago by Steffen Hoffmann

Keywords: TypeError admin web_ui added

Sorry, what screenshots do you refer to here?

Most probably this is due to newly created user accounts, before the user has been authenticated 1st time. I've discovered this a while ago and fixed it in trunk for upcoming acct_mgr-0.3.2, so it would be great, if you could confirm, that trunk works for you.

Note: You'll need to fix some options due to renaming in trunk for acct_mgr-0.4 (see TracIni for all defined options - most notably password_file is depreciated) and Account Details admin page is gone from the side-panel into links - each account name is a direct link to the corresponding side. This should be much more intuitive anyway.

comment:2 Changed 7 years ago by Steffen Hoffmann

#9109 has been closed as a duplicate of this ticket. Looks like you had some trouble with attachments, and you didn't notice the ticket had already been created, right?

comment:3 Changed 7 years ago by vb2807@…

I had tried to attach the screen shots but the attachments were not uploaded successfully. That's why I had created a new ticket (#9109) as well.

Installed the version from trunk. Faced the same issue.

However, after further hit and trial, I was able to make it work. I am not sure if it's a defect but below are the details; just in case you wish to investigate it further. Feel free to contact me if you need any details.

Per my understanding the issue occurs when if I try to list users (Accounts->Users) and if there is no user (as is the case for a fresh installation). Following are the steps to reproduce the issue:

  1. Enable the component 'HtPasswdStore' (in Admin->Plugins->TracAccountManager 0.4dev-r10610)
  2. Go to Accounts->Configuration
  3. Select '1' for Authentication Module 'HtPasswdStore', give a file name to store the passwords
  4. Click 'Save'. No error is received till this point.
  5. Click 'Users' - this is when the error occurs - "Trac detected an internal error: TypeError?: 'NoneType?' object is not iterable".

As a workaround, I enabled the 'Register' module. This allowed me to create a user. And now, when I click on Accounts->Users it works without any issue.

The same is true even if I try to use 'SessionStore' Authentication Module. It appears that the issue is after an Authentication Module has been configured then for users to be listed at least one user must be present.

Regards, Vikas.

comment:4 Changed 7 years ago by Steffen Hoffmann

Status: newassigned

Ok, now I remember. I think I saw this, but obviously I forgot to test and take care for this special case, sorry.

#8930 would have brought me to this point too, but I was busy with other issues by now. Anyway, this should be gone in a minute. Would be nice, if you could test and confirm. Thanks for taking care and taking your time to give feedback here.

comment:5 Changed 7 years ago by Steffen Hoffmann

(In [10613]) AccountManagerPlugin: Prevent seldom TypeError for users admin page, refs #9108.

There has been an exception in the rare case, that no user account had been authenticated before. Nevertheless we take care for it, since the advise to temporarily grant TRAC_ADMIN permission to anonymous users might be considered kind of standard procedure for the initial setup these days.

comment:6 Changed 7 years ago by vb2807@…

Thank you for the quick fix.

I have tested the version from trunk and it is working now with Trac 0.12.2.

comment:7 Changed 7 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [10618]) AccountManagerPlugin: Publish maintenance release 0.3.2, closes #9051, #9082, #9088, #9091, #9092, #9093, #9095, #9099, #9107, #9108 and #9109.

This is an update for current stable at 0.3.1 with a number of fixes for issues reported within the last weeks.

While they will go into acct_mgr-0.4 too, current code isn't ready for release yet and will introduce a number of backwards-incompatible changes. So don't hurry for acct_mgr-0.4 right now.

Just noticed what I'd call a bug in and removed unreasonable dependency on identical absolute path for successful check. Looks like nobody else tried this by now, right? Hey folks!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.