Modify

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#11223 closed defect (fixed)

Due to no *.css files present in htdocs, the directory is not included into the egg.

Reported by: dna Owned by: Jun Omae
Priority: normal Component: TracTicketDepgraphPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

The situation in the summary resulted in an interesting error at our Trac instance, when used together with other plugins, particularly, the TimingAndEstimationPlugin:

14:55:33 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/chrome.py", line 605, in process_request
    in provider.get_htdocs_dirs() or []
  File "build/bdist.linux-x86_64/egg/depgraph/web_ui.py", line 158, in get_htdocs_dirs
    return [('depgraph', resource_filename(__name__, 'htdocs'))]
  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: 'depgraph/htdocs'

Notice the last line.

I suspect there was a time when there were actual css files there. The extremely trivial and ugly fix is to simply create an empty dummy.css file under htdocs/css, and all is well. Specifying a directory for "package_data" in setup.py failed, and so did htdocs/*. Did not try further.

Context:

System Information

  • Trac 1.0.1
  • Babel 0.9.6 (translations unavailable)
  • Docutils 0.8.1
  • Genshi 0.7 (without speedups)
  • Pygments 1.5
  • pysqlite 2.6.0
  • Python 2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2]
  • pytz 2012c
  • setuptools 0.6
  • SQLite 3.7.13
  • Subversion 1.6.17 (r1128011)
  • jQuery 1.7.2

Installed Plugins

  • graphviz 0.7.7dev-r13275
  • timingandestimationplugin 1.3.7
  • TracBurndown 2.0.0dev-r13150
  • TracMasterTickets 3.0.2
  • TracSubTicketsPlugin 0.2.0.dev-20130712
  • TracTicketDepgraph 0.11
  • TracTocMacro 11.0.0.3
  • WikiTableMacro 0.2dev

Attachments (1)

ticket11223-tracticketdepgraphplugin-r13335.diff (1.1 KB) - added by Jun Omae 11 years ago.
Patch for #11223 against tracticketdepgraphplugin/0.11@13335

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by Jun Omae

In this case, I think that DepGraphModule.get_htdocs_dirs() should return [] because the plugin provides no css files. Please try ticket11223-tracticketdepgraphplugin-r13335.diff.

comment:2 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 14700:

Don't include empty htdocs directory. Fixes #11223.

Patch by Jun Omae.

comment:3 Changed 10 years ago by Ryan J Ollos

Owner: changed from Felix Tiede to Jun Omae

Modify Ticket

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