#11089 closed defect (fixed)
KeyError: 'burndown/templates'
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | ScrumBurndownPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Karl Fischer has reported the following issue by email:
Have you been able to use your latest (e.g., [13145]) Burndown plugin with Trac 1.0.1?
I just tried it and got the following stack trace:
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 514, in send_error data, 'text/html') File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 975, in render_template template = self.load_template(filename, method=method) File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 933, in load_template self.get_all_templates_dirs(), auto_reload=self.auto_reload, File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 649, in get_all_templates_dirs dirs.extend(provider.get_templates_dirs() or []) File "/home/safebae/karl/plugins/TracBurndown-2.0.0dev_r0-py2.6.egg/burndown/burndown.py", line 255, in get_templates_dirs return [resource_filename(__name__, 'templates')] File "/home/safebae/karl1/virtualenv-1.9/myVE/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 882, in resource_filename self, resource_name File "/home/safebae/karl1/virtualenv-1.9/myVE/lib/python2.6/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 "/home/safebae/karl1/virtualenv-1.9/myVE/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1363, in _extract_resource zip_stat = self.zipinfo[zip_path] KeyError: 'burndown/templates'
Attachments (0)
Change History (9)
comment:1 Changed 12 years ago by
Trac Release: | → 1.0 |
---|
comment:2 Changed 12 years ago by
The installation is on Dreamhost (DH). I didn't want to interrupt an existing installation of trac.0.11, so I created a DH subdomain associated with a new directory. I installed and activated Virtualenv1.9 and then "easy_installed" Genshi and Trac 1.0.1. I created a new Trac 1.0.1 project, and then modified the index.fcgi and trac.fcgi from the prior installation to work in the new Trac project. I copied over the trac.db from the prior installation and installed plugins: TicketImport-0.8.3, TracBurndown-2.0.0, TracTab-0.2, TracDynamicFields-1.2.3, timingandestimationplugin-1.3.7. Then I enabled the components in trac.ini and added customized settings from the prior installation. Operationally, most functions worked fine (except what is noted aboved). This morning, i installed the latest version of the TracBurndown plugin ([13148]) and updated [component] settings in trac.ini. But it didn't fix it.
comment:3 Changed 12 years ago by
I was able to recreate the issue outside of Dreamhost, using a Debian 6.06 64 bit system with python 2.6.6. I performed an "easy_install" of Genshi and then downloaded and built Trac 1.0.1. I created a new trac project and copied over the database, plugins and configuration files as before. The i ran the standalone server (tracd). It ran exactly as it did in my DH configuration.
comment:4 follow-up: 5 Changed 12 years ago by
The package_data
in setup.py
has a problem.
-
setup.py
25 25 packages=find_packages(exclude=['ez_setup']), 26 26 package_data={ 27 27 'burndown': ['htdocs/js/*.js', 'htdocs/css/*.css', 28 'htdocs/images/*', 'templates/ .html']28 'htdocs/images/*', 'templates/*.html'] 29 29 }, 30 30 entry_points={'trac.plugins': '%s = burndown' % PACKAGE}, 31 31 tests_require=['nose'],
In addition, burndown/config.html
should be unique, e.g. burndown/burndown_config.html
.
comment:5 Changed 12 years ago by
Status: | new → assigned |
---|
Replying to jun66j5:
The
package_data
insetup.py
has a problem.
Thanks, Jun. I'll commit those two fixes now. I'm quite disappointed at myself for not having spotted the issue with package_data
when inspecting yesterday!
I learned in #11072 why issues like this evaded my initial testing. I installed the egg in develop
mode, python setup.py develop
, which just creates a symbolic link to the source directory. In the future, I will make sure to do final testing by installing in the virtualenv with python setup.py install
.
comment:6 follow-up: 9 Changed 12 years ago by
When installing with python setup.py install
and navigating to the Burndown tab, I get: TemplateNotFound: Template "burndown.html" not found
Most recent call last: File "/home/user/Workspace/th11069/trac.git/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/home/user/Workspace/th11069/trac.git/trac/web/main.py", line 233, in dispatch content_type) File "/home/user/Workspace/th11069/trac.git/trac/web/chrome.py", line 979, in render_template template = self.load_template(filename, method=method) File "/home/user/Workspace/th11069/trac.git/trac/web/chrome.py", line 948, in load_template return self.templates.load(filename, cls=cls) File "/home/user/Workspace/th11069/genshi.git/genshi/template/loader.py", line 246, in load raise TemplateNotFound(filename, search_path)
Any idea of why we see different errors?
I'm on Ubuntu 12.10 x32, running tracd
in Trac 1.0-stable
with:
user@ubuntu:~/Workspace/th11069$ python --version Python 2.7.3 user@ubuntu:~/Workspace/th11069$ virtualenv --version 1.7.1.2
and
Trac | 1.0.2dev
|
Genshi | 0.6 (without speedups)
|
pysqlite | 2.6.0
|
Python | 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3]
|
setuptools | 0.6
|
SQLite | 3.7.9
|
jQuery | 1.7.2
|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
- Fixed incorrect
package_data
specification (regression from [13076]). - Renamed
config.html
toadmin_burndown.html
in order to better ensure that we'll meet the requirements that template names are unique. - Changed
url
insetup.py
to point to the trac-hacks site.
Thanks to Jun Omae (jun66j5) for these fixes.
comment:8 Changed 12 years ago by
Karl, please let us know if it is working for you now. After installing the latest version, you'll need to re-enable the plugin through the WebAdmin panel or edit the components
section (see [13148]).
I wouldn't be surprised if you find more issues with this plugin. If so, please search the open issues and create a new ticket if the issue isn't found. I'll try to patch up the plugin if you find any defects.
If you'd like to Register for a trac-hacks account and let me know your username, I can then CC you on tickets after issues are resolved.
One change I have in mind is to eliminate the ScrumBurndown Admin panel and just add a Start Date column on the Milestone Admin panel. Another idea is to remove the Burndown mainnav link and instead have a link on the Reports list page (/report
).
comment:9 Changed 12 years ago by
Replying to rjollos:
Any idea of why we see different errors?
We can reproduce with egg file. In the original issue, the exception raised from _extract_resource
. So it consider that it happened while setuptools/distribute
extracts the egg file.
$ ~/venv/trac/0.12.5/bin/python setup.py clean -a bdist_egg $ ln -s $PWD/dist/TracBurndown-2.0.0dev-py2.4.egg ~/var/trac/0.12/plugins $ ~/venv/trac/0.12.5/bin/trac-admin ~/var/trac/0.12 config set components 'burndown.*' enabled $ ~/venv/trac/0.12.5/bin/trac-admin ~/var/trac/0.12 upgrade $ ~/venv/trac/0.12.5/bin/tracd -s ~/var/trac/0.12
After the above, access the any page in the Trac.
07:31:35 PM Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/trac/web/main.py", line 522, in _dispatch_request dispatcher.dispatch(req) File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/trac/web/main.py", line 264, in dispatch content_type) File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/trac/web/chrome.py", line 836, in render_template template = self.load_template(filename, method=method) File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/trac/web/chrome.py", line 796, in load_template self.templates = TemplateLoader( File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/trac/web/chrome.py", line 511, in get_all_templates_dirs dirs.extend(provider.get_templates_dirs() or []) File "build/bdist.linux-i686/egg/burndown/burndown.py", line 236, in get_templates_dirs File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/distribute-0.6.15-py2.4.egg/pkg_resources.py", line 868, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/distribute-0.6.15-py2.4.egg/pkg_resources.py", line 1345, in get_resource_filename return self._extract_resource(manager, zip_path) File "/home/jun66j5/venv/trac/0.12.5/lib/python2.4/site-packages/distribute-0.6.15-py2.4.egg/pkg_resources.py", line 1356, in _extract_resource zip_stat = self.zipinfo[zip_path] KeyError: 'burndown/templates'
I'm not sure what is going on here. What steps have you taken to install?