Edgewall Software

Opened 14 years ago

Last modified 13 years ago

#9256 closed defect

ZipImportError: bad local file header in /trac/htw/plugins/Latex-0.1_r5294-py2.5.egg — at Version 2

Reported by: s56360@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.5
Severity: normal Keywords:
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Thijs Triemstra)

How to Reproduce

While doing a GET operation on /admin/general/plugin, Trac issued an internal error.

Hi, i built the Latex trac plugin myself with "setup.py bdist_egg", because i had to add a \usepackage declaration and it was working fine. Now i had to update it and loading the plugin suddenly fails. It is installed locally in the trac-environment under plugins, but even if i remove it, the trac webadmin claims it is still there, but the file cannot be found (grepping for Latex gave me a hint that it is still in the trac.db). As soon as i add the new egg to the plugins directory, webadmin gives me the error in the summary. I also restarted tracd between all steps. The egg also seems to be a valid zip-File. I'm not sure what to make of the above mentioned /admin/general/plugin path, maybe it's somehow related to that?

Request parameters:

{'cat_id': u'general', 'panel_id': u'plugin', 'path_info': None}

User Agent was: Mozilla/5.0 (X11; U; SunOS sun4v; en-US; rv:1.9.0.11) Gecko/2009060310 Firefox/3.0.11

System Information

Trac 0.11.5
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
setuptools 0.6c8
SQLite 3.4.2
pysqlite 2.3.2
Genshi 0.5.1
Subversion 1.4.6 (r28521)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 444, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 205, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/admin/web_ui.py", line 114, in process_request
    path_info)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/admin/web_ui.py", line 421, in render_admin_panel
    return self._render_view(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/admin/web_ui.py", line 525, in _render_view
    info = get_pkginfo(dist)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/util/__init__.py", line 253, in get_pkginfo
    pkginfo = email.message_from_string(dist.get_metadata('PKG-INFO'))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1137, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1195, in _get
    return self.loader.get_data(path)
ZipImportError: bad local file header in /trac/htw/plugins/Latex-0.1_r5294-py2.5.egg

Change History (2)

comment:1 by Remy Blank, 14 years ago

Milestone: next-minor-0.12.x

Trac doesn't keep references to plugins in the database, so if you still get the error when removing the plugin and restarting all server instances, then the plugin or its metadata must still be present somewhere.

We could make the retrieval of plugin metadata more resistant against errors, though.

comment:2 by Thijs Triemstra, 13 years ago

Cc: Thijs Triemstra added
Description: modified (diff)
Note: See TracTickets for help on using tickets.