Import error in pkg_resources.py with Python 2.4

37 views
Skip to first unread message

Brettschneider Falk

unread,
Jan 17, 2013, 5:10:56 AM1/17/13
to trac...@googlegroups.com
Hi,
according to the Trac API [1], there is

def get_templates_dirs(self):
from pkg_resources import resource_filename
return [resource_filename(__name__, 'templates')]

but pkg_resources.py raises an "ImportError: No module named path" with Python 2.4. Unfortunately, an update to 2.5 is not an option, although 2.5 works well.

What can I do? Details are here in [2]. This function get_templates_dirs is quite standard and reused by copy in several plugins.

[1] http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.chrome.ITemplateProvider
[2] http://trac-hacks.org/ticket/10798


CU, F@lk

----
R&D Software
Baumer Optronic GmbH
www.baumer.com




Gesch?ftsf?hrer: Dr. Albert Schmidt* Dr. Oliver Vietze
Sitz der Gesellschaft: Radeberg
Amtsgericht Dresden: HRB 15379
Ust. ID: DE 189714583


Brettschneider Falk

unread,
Jan 17, 2013, 10:31:30 AM1/17/13
to trac...@googlegroups.com
I wrote:
> but pkg_resources.py raises an "ImportError: No module named path"

Meanwhile jun66j5 found out it was just a subsequent error of another problem. If interested, see the ticket for details. Kudos to jun66j5.
Reply all
Reply to author
Forward
0 new messages