Modify

Opened 5 years ago

Closed 5 years ago

#4611 closed defect (fixed)

KeyError: 'progressmeter/htdocs'

Reported by: watho Owned by: qwp0
Priority: normal Component: ProgressMeterMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Deleting the folder htdocs in your latest change 5224, seems to lead to the following error:

Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7854-py2.5.egg/trac/web/main.py", line 459, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7854-py2.5.egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7854-py2.5.egg/trac/web/chrome.py", line 406, in process_request
    in provider.get_htdocs_dirs() if dir[0] == prefix]:
  File "build/bdist.linux-i686/egg/progressmeter/macro.py", line 68, in get_htdocs_dirs
    return [('progressmeter', resource_filename(__name__, 'htdocs'))]
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename
    self, resource_name
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1322, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'progressmeter/htdocs'

Changing

def get_htdocs_dirs(self):
        from pkg_resources import resource_filename
        return [('progressmeter', resource_filename(__name__, 'htdocs'))

to

def get_htdocs_dirs(self):
        return []

helps here.

MfG WaTho

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by qwp0

Strange, getting no errors here (neither with an egg-link, nor a simple egg). I see you're using Trac 0.12dev-r7854, I've been testing on Trac 0.12multirepos-r7684 -- maybe that's the problem.

Nevertheless, I'm committing this change and hereby fixing this ticket.

comment:2 Changed 5 years ago by qwp0

  • Resolution set to fixed
  • Status changed from new to closed

(In [5301]) ProgressMeterMacro: return no htdocs dirs, fix #4611

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from qwp0. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.