Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10461 closed defect (fixed)

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

Reported by: Jens Langner Owned by: Ryan J Ollos
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 (0)

Change History (9)

comment:1 Changed 12 years ago by Ryan J Ollos

Owner: changed from Radek Bartoň to Ryan J Ollos
Status: newassigned

Do you have TagsPlugin enabled?

comment:2 Changed 12 years ago by Jens Langner

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.

comment:3 in reply to:  2 Changed 12 years ago by Ryan J Ollos

Cc: anonymous added; Ryan J Ollos removed

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.

comment:4 Changed 12 years ago by Ryan J Ollos

Just want to clarify, is the following correct?:

You have?:

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

Is TagsPlugin enabled or disabled?

comment:5 Changed 12 years ago by Jens Langner

No, I had the following:

tracdiscussion.* = enabled
tractags.* = disabled

comment:6 Changed 12 years ago by Ryan J Ollos

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.

comment:7 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(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.

comment:8 Changed 12 years ago by Ryan J Ollos

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

comment:9 in reply to:  2 Changed 12 years ago by Ryan J Ollos

Replying to damato:

  1. 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?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.