Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

#9035 closed defect (fixed)

KeyError: 'trac' on Admin>Plugins page

Reported by: oli.b@… Owned by: Remy Blank
Priority: high Milestone: 0.12
Component: admin/web Version: 0.12dev
Severity: major Keywords: KeyError
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm getting a KeyError: 'trac' when trying to display the Plugins-Page of the Admin-Section of trac. I'm using 0.12dev-r9157 under WinXP with Apache 2.2.14, Python 2.5.4, mod_python-3.3.1.

The error appears not only in my existing trac environments but also if I setup a new trac environment and also if I install all the Python stuff (i.e. svn-python, setuptools, Genshi, pygments, Babel, docutils, …) from scratch.

There are no plugins involved, only "trac 0.12dev-r9157 c:\python25\lib\site-packages\trac-0.12dev_r9157-py2.5.egg" is listed as "plugin".

Before r9157, I had multirepos-r8774 installed, where the bug did not appear.

Attachments (1)

EGG-INFO.ZIP (5.1 KB ) - added by oli.b@… 14 years ago.
EGG-INFO part of Trac-0.12dev_r9157-py2.5.egg

Download all attachments as: .zip

Change History (17)

comment:1 by oli.b@…, 14 years ago

(forgot the) stacktrace:

# file "build/bdist.win32/egg/trac/web/main.py", line 495, in  _dispatch_request
# file "build/bdist.win32/egg/trac/web/main.py", line 227, in dispatch
# file "build/bdist.win32/egg/trac/admin/web_ui.py", line 115, in process_request
# file "build/bdist.win32/egg/trac/admin/web_ui.py", line  415, in render_admin_panel
# file "build/bdist.win32/egg/trac/admin/web_ui.py", line 497, in _render_view 

comment:2 by Remy Blank, 14 years ago

Owner: set to Remy Blank

Could you please post the complete traceback? This is weird, because the string used on line 497 of web_ui.py is "Trac", not "trac".

comment:3 by tangokorea@…, 14 years ago

I had change line 497 of web_ui.py(trac-0.12dev/trac/admin/) from "Trac" to "trac". After modified, re-compile catalog and then install trac. After all, i've solved. try and fun!!!! plugin_list = [pluginstrac]

Version 0, edited 14 years ago by tangokorea@… (next)

in reply to:  3 ; comment:4 by Remy Blank, 14 years ago

Replying to tangokorea@…:

I had change line 497 of web_ui.py(trac-0.12dev/trac/admin/) from "Trac" to "trac".

You shouldn't need to do that. Could you please post the complete traceback from the log? Maybe there's some case sensitivity weirdness with setuptools. What version of setuptools do you have installed?

comment:5 by Remy Blank, 14 years ago

I have made plugin info processing more robust in [9164], so you shouldn't get an internal error anymore. But I'd still be interested to know why your Trac installation comes up as "trac" instead of "Trac" in the plugin information.

in reply to:  description ; comment:6 by Remy Blank, 14 years ago

Replying to oli.b@…:

There are no plugins involved, only "trac 0.12dev-r9157 c:\python25\lib\site-packages\trac-0.12dev_r9157-py2.5.egg" is listed as "plugin".

Oh, funny, this shouldn't be listed under "plugins" at all… Did you by any chance rename the egg from "Trac-0.12dev_r9157-py2.5.egg" to "trac-0.12dev_r9157-py2.5.egg"? Normally, setuptools should warn about that, but as you're running on Windows, it probably didn't notice, due to the filesystem being case-insensitive.

I have just generated Trac eggs on Linux and Windows, and both are named "Trac-*".

in reply to:  2 comment:7 by oli.b@…, 14 years ago

Replying to rblank:

Could you please post the complete traceback? This is weird, because the string used on line 497 of web_ui.py is "Trac", not "trac".


This is the traceback from the trac logfile:

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 495, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 227, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\trac\admin\web_ui.py", line 115, in process_request
    path_info)
  File "build\bdist.win32\egg\trac\admin\web_ui.py", line 415, in render_admin_panel
    return self._render_view(req)
  File "build\bdist.win32\egg\trac\admin\web_ui.py", line 497, in _render_view
    plugin_list = [plugins['Trac']]

in reply to:  4 comment:8 by oli.b@…, 14 years ago

Replying to rblank:

Replying to tangokorea@…:

I had change line 497 of web_ui.py(trac-0.12dev/trac/admin/) from "Trac" to "trac".

You shouldn't need to do that. Could you please post the complete traceback from the log?

see above!

Maybe there's some case sensitivity weirdness with setuptools. What version of setuptools do you have installed?

version 0.6c11

in reply to:  6 ; comment:9 by oli.b@…, 14 years ago

Replying to rblank:

Did you by any chance rename the egg from "Trac-0.12dev_r9157-py2.5.egg" to "trac-0.12dev_r9157-py2.5.egg"? Normally, setuptools should warn about that, but as you're running on Windows, it probably didn't notice, due to the filesystem being case-insensitive.

I did not rename the Trac-egg. It is c:\Python25\Lib\site-packages\Trac-0.12dev_r9157-py2.5.egg (with capital "T")

Thank you for Your help!

in reply to:  9 ; comment:10 by Remy Blank, 14 years ago

Replying to oli.b@…:

I did not rename the Trac-egg. It is c:\Python25\Lib\site-packages\Trac-0.12dev_r9157-py2.5.egg (with capital "T")

That's really weird. Could you please attach the egg here? Maybe the metadata is not generated correctly.

in reply to:  5 comment:11 by oli.b@…, 14 years ago

Replying to rblank:

I have made plugin info processing more robust in [9164], so you shouldn't get an internal error anymore.

I updated to r9164 - the bug does not occur any more. :) Thank You!

in reply to:  10 ; comment:12 by oli.b@…, 14 years ago

Replying to rblank:

That's really weird. Could you please attach the egg here?

max. size of attachment: 262144 Bytes, the egg's size is 3010993 Bytes…

Alternatively I could ZIP the EGG-INFO subdirectory of the egg. Is this sufficient?

in reply to:  12 comment:13 by Remy Blank, 14 years ago

Replying to oli.b@…:

max. size of attachment: 262144 Bytes, the egg's size is 3010993 Bytes…

Ah, yes, I didn't think of that.

Alternatively I could ZIP the EGG-INFO subdirectory of the egg. Is this sufficient?

Yes, this should be enough. Thanks!

by oli.b@…, 14 years ago

Attachment: EGG-INFO.ZIP added

EGG-INFO part of Trac-0.12dev_r9157-py2.5.egg

comment:14 by Remy Blank, 14 years ago

Mmh, the metadata is correct. So I guess I'll have to turn to setuptools as the next suspect.

in reply to:  14 comment:15 by oli.b@…, 14 years ago

Replying to rblank:

Mmh, the metadata is correct. So I guess I'll have to turn to setuptools as the next suspect.

I did

wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py

what brought me setuptools-0.6c11-py2.5.egg

comment:16 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

Looking a bit at setuptools, I couldn't find a quick explanation. But at least the issue is fixed, so I'm closing this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.