Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#2220 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'process_discussion'

Reported by: strangest@… Owned by: Radek Bartoň
Priority: normal Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The installation worked perfectly. But clicking on the discussion link throws this error.

Below is the generated traceback on the ticket in our system.

AttributeError: 'NoneType' object has no attribute 'process_discussion' Reported by: gloriajw Owned by: somebody Type: defect Priority: major Milestone: Component: component1 Version: Keywords: Cc: Description ¶ How to Reproduce ¶

While doing a GET operation on /discussion, Trac issued an internal error.

(please provide additional details here) System Information ¶

Trac 0.11dev-r6122 Python 2.5.1 (r251:54863, Nov 3 2007, 22:35:11) [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] setuptools 0.6c7 SQLite 3.3.17 pysqlite 2.3.2 Genshi 0.5dev Subversion 1.4.5 (r25188) Python Traceback ¶

Traceback (most recent call last):

File "/usr/local/python/2.5.1/lib/python2.5/site-packages/Trac-0.11dev_r6122-py2.5.egg/trac/web/main.py", line 381, in dispatch_request

dispatcher.dispatch(req)

File "/usr/local/python/2.5.1/lib/python2.5/site-packages/Trac-0.11dev_r6122-py2.5.egg/trac/web/main.py", line 191, in dispatch

resp = chosen_handler.process_request(req)

File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 78, in process_request

return api.process_discussion(context) + (None,)

AttributeError: 'NoneType' object has no attribute 'process_discussion'

Attachments (0)

Change History (8)

comment:1 Changed 17 years ago by Radek Bartoň

Resolution: invalid
Status: newclosed
Trac Release: 0.100.11

Seems like you forgot/didn't know to enable API component in trac.ini when upgrading from 0.10 branch. See http://trac-hacks.org/wiki/DiscussionPlugin#Installation especially comment in trac.ini snipplet.

comment:2 Changed 17 years ago by strangest@…

Resolution: invalid
Status: closedreopened

I wish it were that easy. I installed directly from the 0.11 release. I installed the trac.ini settings directly from the DiscussionPlugin page you reference above. I gave myself discussion privileges, as stated, and I even see the discussion button.

comment:3 Changed 17 years ago by Radek Bartoň

So If you are possitive that this line is in your trac.ini:

[components]
tracdiscussion.api.DiscussionApi = enabled

I would like to see cut from your debug log, especially part when plugin's components are loaded and part generated by /discussion request since I'm not able to reproduce this error when this component is enabled. For information how to enable debug logging see BugReporting.

comment:4 Changed 17 years ago by strangest@…

Here's the log entry after clicking on the discussion button:

Nov 26 16:52:05 localhost Trac[loader] WARNING: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("textile>=2.0" not found) Nov 26 16:52:05 localhost Trac[loader] WARNING: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("docutils>=0.3" not found) Nov 26 16:52:05 localhost Trac[loader] WARNING: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("Pygments>=0.6" not found) Nov 26 16:52:05 localhost Trac[loader] WARNING: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("SilverCity>=0.9.4" not found) Nov 26 16:52:05 localhost Trac[main] ERROR: 'NoneType' object has no attribute 'process_discussion'#012Traceback (most recent call last):#012 File "/usr/local/python/2.5.1/lib/python2.5/site-packages/Trac-0.11dev_r6122-py2.5.egg/trac/web/main.py", line 381, in dispatch_request#012 dispatcher.dispatch(req)#012 File "/usr/local/python/2.5.1/lib/python2.5/site-packages/Trac-0.11dev_r6122-py2.5.egg/trac/web/main.py", line 191, in dispatch#012 resp = chosen_handler.process_request(req)#012 File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 78, in process_request#012 return api.process_discussion(context) + (None,)#012AttributeError: 'NoneType' object has no attribute 'process_discussion'

Here's the log entry after clicking on anything else functional:

Nov 26 16:54:43 localhost Trac[loader] WARNING: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("textile>=2.0" not found) Nov 26 16:54:43 localhost Trac[loader] WARNING: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("docutils>=0.3" not found) Nov 26 16:54:43 localhost Trac[loader] WARNING: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("Pygments>=0.6" not found) Nov 26 16:54:43 localhost Trac[loader] WARNING: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("SilverCity>=0.9.4" not found) Nov 26 16:54:47 localhost Trac[loader] WARNING: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("textile>=2.0" not found) Nov 26 16:54:47 localhost Trac[loader] WARNING: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("docutils>=0.3" not found) Nov 26 16:54:47 localhost Trac[loader] WARNING: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("Pygments>=0.6" not found) Nov 26 16:54:47 localhost Trac[loader] WARNING: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("SilverCity>=0.9.4" not found)

Looks like we have some unrelated template problem. Hopefully it's unrelated.

comment:5 Changed 17 years ago by Radek Bartoň

Thanks, but this don't tell nothing more than Python traceback. I need log with DEBUG level enabled. Read BugReporting to know how to enable it. And please put it inside {{{ }}} to preserve indentation or attach it as a file.

comment:6 Changed 17 years ago by anonymous

Resolution: fixed
Status: reopenedclosed

FOUND IT!

I pasted the comment in my trac.ini along with the line, as documented:

tracdiscussion.api.DiscussionApi = enabled # For 0.11 branch. API object is component since then.

since it looked harmless. But it broke the installation. Removing the comment caused it to work.

comment:7 Changed 17 years ago by Radek Bartoň

Great. It's weird that Trac skips entire line if there is # comment. I'll update DiscussionPlugin page to prevent this kind of misconfiguration in future.

comment:8 Changed 17 years ago by strangest@…

Thanks for your quick help.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
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.