Modify

Opened 2 years ago

Closed 3 weeks ago

#10300 closed defect (fixed)

KeyError: 'tracwikiextras\\htdocs\\css\\boxes-300.css'

Reported by: lucid Owned by: mrelbe
Priority: normal Component: WikiExtrasPlugin
Severity: critical Keywords:
Cc: martin.wagner@… Trac Release: 1.0

Description

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\api.py", line 502, in send_error
    data, 'text/html')
  File "build\bdist.win32\egg\trac\web\chrome.py", line 960, in render_template
    template = self.load_template(filename, method=method)
  File "build\bdist.win32\egg\trac\web\chrome.py", line 920, in load_template
    self.get_all_templates_dirs(), auto_reload=self.auto_reload,
  File "build\bdist.win32\egg\trac\web\chrome.py", line 636, in get_all_templates_dirs
    for provider in self.template_providers:
  File "build\bdist.win32\egg\trac\core.py", line 78, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "build\bdist.win32\egg\trac\core.py", line 199, in __getitem__
    component = cls(self)
  File "build\bdist.win32\egg\trac\core.py", line 138, in __call__
    self.__init__()
  File "build\bdist.win32\egg\tracwikiextras\boxes.py", line 117, in __init__
    'htdocs', 'css', 'boxes-%d.css' % self.rbox_width))
  File "C:\Python26\VirtualEnvs\trac\lib\site-packages\setuptools-0.6c11-py2.6.egg\pkg_resources.py", line 882, in resource_filename
    self, resource_name
  File "C:\Python26\VirtualEnvs\trac\lib\site-packages\setuptools-0.6c11-py2.6.egg\pkg_resources.py", line 1352, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "C:\Python26\VirtualEnvs\trac\lib\site-packages\setuptools-0.6c11-py2.6.egg\pkg_resources.py", line 1363, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'tracwikiextras\\htdocs\\css\\boxes-300.css'

Attachments (0)

Change History (6)

comment:1 Changed 2 years ago by lucid

At https://groups.google.com/forum/#!msg/trac-users/1tBdOrsrnhQ/4Co5YPBwDH0J Sam Halliday

I had to give write access to the www-data user for this directory /usr/local/lib/python2.7/dist-packages/TracWikiExtras-0.13.2dev-py2.7.egg/tracwikiextras/htdocs/css/ to create "boxes-300.css" and "boxes-300-toc.css".

But I'm not sure where the equivalent is in my setup: Windows, IIS, setup.py bdist_egg and copying the egg to the plugin directory of the trac environment. (The problem disappears with setup.py develop.)

comment:2 follow-up: Changed 19 months ago by martin.wagner@…

  • Cc martin.wagner@… added; anonymous removed
  • Severity changed from normal to critical

i did a chmod -R a+rwx on the css-path, but still it doesn't work.

it's TracWikiExtraPlugin 0.13.1 with Trac 1.0.1 on Ubuntu 12.04 in my case.

comment:3 in reply to: ↑ 2 Changed 19 months ago by martin.wagner@…

to clarify: i did this in the PYTHON_EGG_CACHE-dir

Replying to martin.wagner@…:

i did a chmod -R a+rwx on the css-path, but still it doesn't work.

it's TracWikiExtraPlugin 0.13.1 with Trac 1.0.1 on Ubuntu 12.04 in my case.

comment:4 Changed 11 months ago by asdorsey

My entire PYTHON_EGG_CACHE (/var/trac/projects/.egg-cache) directory is owned by the apache user (CentOS 6) but I'm still getting this error.

I can su to the apache user and create the files the error is complaining about.

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 514, in send_error
    data, 'text/html')
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 975, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 933, in load_template
    self.get_all_templates_dirs(), auto_reload=self.auto_reload,
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 648, in get_all_templates_dirs
    for provider in self.template_providers:
  File "/usr/lib/python2.6/site-packages/trac/core.py", line 78, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "/usr/lib/python2.6/site-packages/trac/core.py", line 199, in __getitem__
    component = cls(self)
  File "/usr/lib/python2.6/site-packages/trac/core.py", line 138, in __call__
    self.__init__()
  File "build/bdist.linux-x86_64/egg/tracwikiextras/boxes.py", line 117, in __init__
    'htdocs', 'css', 'boxes-%d.css' % self.rbox_width))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 863, in resource_filename
    self, resource_name
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1339, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1350, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'tracwikiextras/htdocs/css/boxes-300.css'

comment:5 Changed 6 weeks ago by anonymous

I get the same message. I am on windows. I am using trac admin panel to install the .egg that i create form python setup.py bdist_egg. I have tried to create the folders and boxes-300.css file and still get the same message. There is another ticket #11401 that involves permissions that is probably related, but I have tried everything there and still a no go. I even tried modifying the boxes.py file and that at least removed this error but the plugin did not work otherwise.

comment:6 Changed 3 weeks ago by mrelbe

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

#11041 was fixed in such a way that physical css-files are no more dynamically created, which should make the problem stated in this ticket go away. If not, feel free to re-open.

Add Comment

Modify Ticket

Action
as closed The owner will remain mrelbe.
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.