Ticket #1872 (closed defect: duplicate)

Opened 5 months ago

Last modified 3 months ago

[PATCH] Newer version of pkg_resources is broken to locate static objects

Reported by: godoy Assigned to: anonymous
Priority: normal Milestone: 1.0.x bugfix
Component: TurboGears Version: 1.0.4.4
Severity: normal Keywords:
Cc:

Description

Last weekend I switched from the 32 bit version of OpenSuSE 10.3 to the 64 bit OpenSuSE 11.0 and had to reinstall all my working TG environment.

After that, I started having problems with my projects because all access to static contents started failing.

Checking TG's code, I see that we omit the last character, probably guessing that it is a "/" or r"\". In my case, pkg_resources gives me this output already "clean" and hence this instruction causes a failure here:

In [1]: import pkg_resources

In [2]: pkg_resources.resource_filename('siteamostras', "")
Out[2]: '/home/godoy/disconnected-work/Site-Amostras/siteamostras'

If my guess on the reason for getting up to the penultimate character on the filename resource provided by pgk_resources was correct, then the attached patch should fix this problem.

Attachments

config.py.diff (1.4 kB) - added by godoy on 06/23/08 05:55:19.
Patch for config.py - r4805 in 1.0 branch

Change History

06/23/08 05:55:19 changed by godoy

  • attachment config.py.diff added.

Patch for config.py - r4805 in 1.0 branch

06/23/08 05:58:31 changed by godoy

  • summary changed from 64-bit environment breaks pkg_resources use to locate static objects (possibly due to upgrade of pkg_resources) to [PATCH] Newer version of pkg_resources is broken to locate static objects.

08/21/08 23:11:25 changed by Chris Arndt

  • status changed from new to closed.
  • resolution set to duplicate.

This is a duplicate to #1796. The issue has been fixed in r4892.