Modify

Opened 5 years ago

Closed 5 years ago

#12417 closed defect (fixed)

KeyError: 'tracvote/locale'

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: VotePlugin
Severity: normal Keywords:
Cc: Steffen Hoffmann Trac Release:

Description

The following error was seen without Babel installed:

Traceback (most recent call last):
  File "/Users/rjollos/t12286/trac-1.0.6/trac/web/api.py", line 559, in send_error
    data, 'text/html')
  File "/Users/rjollos/t12286/trac-1.0.6/trac/web/chrome.py", line 1063, in render_template
    template = self.load_template(filename, method=method)
  File "/Users/rjollos/t12286/trac-1.0.6/trac/web/chrome.py", line 1017, in load_template
    self.get_all_templates_dirs(), auto_reload=self.auto_reload,
  File "/Users/rjollos/t12286/trac-1.0.6/trac/web/chrome.py", line 725, in get_all_templates_dirs
    for provider in self.template_providers:
  File "/Users/rjollos/t12286/trac-1.0.6/trac/core.py", line 78, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "/Users/rjollos/t12286/trac-1.0.6/trac/core.py", line 204, in __getitem__
    component = cls(self)
  File "/Users/rjollos/t12286/trac-1.0.6/trac/core.py", line 140, in __call__
    self.__init__()
  File "build/bdist.macosx-10.10-x86_64/egg/tracvote/__init__.py", line 102, in __init__
    locale_dir = resource_filename(__name__, 'locale')
  File "/Users/rjollos/t12286/pve/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1127, in resource_filename
    self, resource_name
  File "/Users/rjollos/t12286/pve/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1824, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/Users/rjollos/t12286/pve/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1845, in _extract_resource
    timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
KeyError: 'tracvote/locale'

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 14750:

0.3dev: Avoid KeyError when Babel not installed. Fixes #12417.

Thanks to Jun Omae for providing the fix, copied from the same issue with the WatchlistPlugin in #12176.

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.