Opened 9 years ago

Closed 7 years ago

Last modified 6 years ago

#11582 closed defect (duplicate)

KeyError: 'lightertheme/templates' after install

Reported by: benoit.hocquet@… Owned by: ejucovy
Priority: normal Component: LighterTheme
Severity: normal Keywords:
Cc: Trac Release:


Followed steps : Downloading sources at 0.3.1 Build egg with 'python bdist_egg' Copy .egg file to 'trac/plugin' folder Restart server.

Trac page displays this :

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 458, in send_error
    data, 'text/html')
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 836, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 797, in load_template
    self.get_all_templates_dirs(), auto_reload=self.auto_reload,
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 511, in get_all_templates_dirs
    dirs.extend(provider.get_templates_dirs() or [])
  File "build/bdist.linux-x86_64/egg/lightertheme/", line 73, in get_templates_dirs
    return ["lightertheme", resource_filename(__name__, 'templates')]
  File "/usr/lib/python2.7/dist-packages/", line 904, in resource_filename
    self, resource_name
  File "/usr/lib/python2.7/dist-packages/", line 1380, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib/python2.7/dist-packages/", line 1391, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'lightertheme/templates'

Attachments (0)

Change History (7)

comment:1 Changed 9 years ago by Ryan J Ollos

I can reproduce. The following patch seems to be needed:


    diff --git a/ b/
    index 3c265fb..25f2470 100644
    a b  
    1 graft lightertheme/htdocs/
     1graft lightertheme/templates/lightertheme
    22include CHANGES.txt
    33include LICENSE.txt

comment:2 Changed 8 years ago by Jun Omae

#12029 was closed as duplicate.

comment:3 Changed 8 years ago by anonymous

Same problem. we are lost our trac repo.

comment:4 in reply to:  3 Changed 8 years ago by Ryan J Ollos

Replying to anonymous:

Same problem. we are lost our trac repo.

Lost is unlikely the correct word. It's possible you are seeing an error on every page, which is a good reason to always test plugins on another Trac instance before installing them.

To fix the issue, just disable the plugin and restart the webserver. If you still have an error, delete the egg. If you continue to have trouble, please ask on the MailingList.

comment:5 Changed 8 years ago by Ryan J Ollos

Ethan, if you'd prefer I can make a pull request in the GitHub repository for the patch in comment:1.

comment:6 Changed 7 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

See also issue 1 for UserPicturesPlugin. Another solution is to just remove include_package_data in, which would allow to also be deleted.

I created a pull request, so closing this ticket as a duplicate.

comment:7 Changed 6 years ago by Ryan J Ollos

Issue is fixed in GitHub repository.

Modify Ticket

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