Ticket #10461 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

"TypeError: 'NoneType' object is not iterable" with Trac 1.0

Reported by: damato Assigned to: rjollos
Priority: normal Component: DiscussionPlugin
Severity: blocker Keywords:
Cc: Trac Release: 1.0

Description

After upgrading to Trac 1.0 I also upgraded my TracDisussion? installation to the latest sources from the SVN (r12139). However, as soon as I started using it trac now always returns the following error message in the logs:

2012-10-10 09:18:46,130 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/tracdiscussion/core.py", line 112, in process_request
    template, data = api.process_discussion(context)
  File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 260, in process_discussion
    self._do_actions(context, actions)
  File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 705, in _do_actions
    context.data['forums'] = self.get_forums(context, order, desc)
  File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 1847, in get_forums
    'discussion', 'forum/%s' % (forum['id'])))
  File "build/bdist.linux-x86_64/egg/tractags/api.py", line 236, in get_tags
    .get_resource_tags(req, resource))
TypeError: 'NoneType' object is not iterable

After reverting to revision r9787 TracDiscussion? started working again.

Attachments

Change History

10/10/12 14:53:56 changed by rjollos

  • status changed from new to assigned.
  • owner changed from Blackhex to rjollos.

Do you have TagsPlugin enabled?

(follow-ups: ↓ 3 ↓ 9 ) 10/10/12 15:08:38 changed by damato

After checking, I had indeed disabled it. However:

  1. it should not throw an error like this if the TagsPlugin is disabled but better hide all the tags features
  2. I also had the permissions for the tags plugin set to disabled for anonymous use and thus the discussion forum also throwed the error for anonymous users.

Now I have enabled the tags plugin for all users, however IMHO the discussion plugin should not force the use of the tags plugin as not all installation (as mine) is requiring the tags.

(in reply to: ↑ 2 ) 10/10/12 15:38:45 changed by rjollos

  • cc deleted.

Replying to damato:

it should not throw an error like this if the TagsPlugin is disabled but better hide all the tags features.

Agreed. The way in which the TagsPlugin functionality is provided can be improved on. There are some related problems in #9576 and #8832 that I haven't had time to work on.

I'll get this issue fixed in a moment, so that you aren't held up.

10/10/12 16:38:15 changed by rjollos

Just want to clarify, is the following correct?:

You have?:

tracdiscussion.tags.DiscussionTagProvider = disabled
tracdiscussion.tags.DiscussionTags = disabled

Is TagsPlugin enabled or disabled?

10/10/12 17:23:44 changed by damato

No, I had the following:

tracdiscussion.* = enabled
tractags.* = disabled

10/10/12 17:33:12 changed by rjollos

Okay, for now the workaround is:

tracdiscussion.admin.discussionwebadmin = enabled
tracdiscussion.ajax.discussionajax = enabled
tracdiscussion.api.discussionapi = enabled
tracdiscussion.core.discussioncore = enabled
tracdiscussion.init.discussioninit = enabled
tracdiscussion.notification.discussionemailnotification = enabled
tracdiscussion.search.discussionsearch = enabled
tracdiscussion.tags.discussiontagprovider = disabled
tracdiscussion.tags.discussiontags = disabled
tracdiscussion.timeline.discussiontimeline = enabled
tracdiscussion.wiki.discussionwiki = enabled

I'll have a real fix in place soon.

10/10/12 20:53:12 changed by rjollos

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

(In [12141]) Fixes #10461, Refs #8832: The components tracdiscussion.tags.DiscussionTags and tractags.api.TagSystem must be enabled in order for TagsPlugin support to be enabled. This is a workaround that will likely be improved on in #8832 as the tags module is redesigned.

10/10/12 20:54:13 changed by rjollos

Please report back if this is working well for you after upgrading to r12141, if you can. Thanks.

(in reply to: ↑ 2 ) 10/10/12 21:58:43 changed by rjollos

Replying to damato:

2. I also had the permissions for the tags plugin set to disabled for anonymous use and thus the discussion forum also throwed the error for anonymous users.

I may not have adequately covered this case. Could you do some testing and report back?


Add/Change #10461 ("TypeError: 'NoneType' object is not iterable" with Trac 1.0)




Change Properties
Action