Opened 15 years ago

Closed 14 years ago

Last modified 14 months ago

#5428 closed defect (fixed)

Template "autoquery_ticket.html" not found

Reported by: Sebastian Krysmanski Owned by: Jeff Hammel
Priority: high Component: AutoQueryPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11


I've just installed this plugin via easy_install and it doesn't work as the directory templates isn't included in the egg. Trac prints the error:

Template "autoquery_ticket.html" not found

The problem can be solved by unpacking the egg and downloading the template file manually.

Attachments (0)

Change History (3)

comment:1 Changed 15 years ago by Michael Ching can be patched to include the templates directory.

---       2009-07-07 12:03:49.000000000 -0500
+++    2009-07-07 12:04:11.000000000 -0500
@@ -10,7 +10,8 @@
       keywords='trac plugin',
-      packages=find_packages(exclude=['ez_setup', 'examples', 'tests*']),
+      packages = ['autoquery'],
+      package_data = { 'autoquery': ['templates/*.html'] },
       entry_points = """

comment:2 Changed 14 years ago by aexl

TNX, this patch saved my evening.

here is mi traceback for reference. after applying the patch no errors anymore.

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/", line 339, in send_error
  File "/usr/lib/python2.5/site-packages/trac/web/", line 683, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib/python2.5/site-packages/trac/web/", line 659, in load_template
    self.templates = TemplateLoader(self.get_all_templates_dirs(),
  File "/usr/lib/python2.5/site-packages/trac/web/", line 406, in get_all_templates_dirs
    dirs += provider.get_templates_dirs()
  File "build/bdist.linux-x86_64/egg/autoquery/", line 37, in get_templates_dirs
    return [resource_filename(__name__, 'templates')]
  File "build/bdist.linux-x86_64/egg/", line 882, in resource_filename
    self, resource_name
  File "build/bdist.linux-x86_64/egg/", line 1352, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "build/bdist.linux-x86_64/egg/", line 1363, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'autoquery/templates'

comment:3 Changed 14 years ago by Jeff Hammel

Resolution: fixed
Status: newclosed

(In [7228]) fixes #5428

Modify Ticket

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