Opened 15 months ago

Last modified 2 months ago

#11582 new defect

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 (5)

comment:1 Changed 15 months ago by rjollos

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 6 months ago by jun66j5

#12029 was closed as duplicate.

comment:3 follow-up: Changed 2 months ago by anonymous

Same problem. we are lost our trac repo.

comment:4 in reply to: ↑ 3 Changed 2 months ago by rjollos

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 2 months ago by rjollos

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

Add Comment

Modify Ticket

as new The owner will remain ejucovy.

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

Note: See TracTickets for help on using tickets.