Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1872 (closed defect: duplicate)

Opened 11 years ago

Last modified 11 years ago

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

Reported by: godoy Owned by: 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 Download (1.4 KB) - added by godoy 11 years ago.
Patch for config.py - r4805 in 1.0 branch

Change History

Changed 11 years ago by godoy

Patch for config.py - r4805 in 1.0 branch

comment:1 Changed 11 years ago 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

comment:2 Changed 11 years ago 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.

Note: See TracTickets for help on using tickets.