Modify

Opened 6 months ago

Last modified 6 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:

Description

Followed steps :
Downloading sources at 0.3.1
Build egg with 'python setup.py 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/api.py", line 458, in send_error
    data, 'text/html')
  File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 836, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 797, in load_template
    self.get_all_templates_dirs(), auto_reload=self.auto_reload,
  File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 511, in get_all_templates_dirs
    dirs.extend(provider.get_templates_dirs() or [])
  File "build/bdist.linux-x86_64/egg/lightertheme/__init__.py", line 73, in get_templates_dirs
    return ["lightertheme", resource_filename(__name__, 'templates')]
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 904, in resource_filename
    self, resource_name
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1380, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1391, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'lightertheme/templates'

Attachments (0)

Change History (1)

comment:1 Changed 6 months ago by rjollos

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

  • MANIFEST.in

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

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.