I have solved this issue, see ticket here. http://bitbucket.org/chris1610/satchmo/issue/961/thumbnails-dont-work-on-windows#comment-94491
And the fix here http://bitbucket.org/chris1610/satchmo/changeset/b76f3a6c0c24/ <http://bitbucket.org/chris1610/satchmo/issue/961/thumbnails-dont-work-on-windows#comment-94491> Justin On Sun, Dec 20, 2009 at 1:56 PM, cc <[email protected]> wrote: > Well I see the normalize_path in settings.py now after doing > clonesatchmo.py. There is a typo: > > MEDIA_ROOT = normalize_path(os.path.join(DIRNAME, 'static/') > > should be > > MEDIA_ROOT = normalize_path(os.path.join(DIRNAME, 'static/')) > > And even though this patch was provided it looks like no one with a > Windows machine has tested this as it does nothing to help. > > Still, the default store after doing clonesatchmo.py does not show > thumbnails and the image paths in the HTTP REQUESTS still look like: > > [27/Nov/2009 21:00:11] "GET /static/c:/users/cc/workspace/newstore/ > src/ > store/static/images/users/cc/workspac > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/static/images/users/cc/workspace/ne > wstore/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newsto > re/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newstore/s > rc/store/static/images/users/cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src/s > tore/static/images/users/cc/workspace/newstore/src/store/static/ > images/ > users/cc/workspace/newstore/src/store > /static/images/users/cc/workspace/newstore/src/store/static/images/ > users/cc/workspace/newstore/src/store/sta > tic/images/users/cc/workspace/newstore/src/store/static/images/users/ > cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/imag > es/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images/u > sers/cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users > /cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/mar > c/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc > n/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc/wo > rkspace/newstore/src/store/static/images/users/cc/workspace/newstore/ > src/store/static/images/users/cc/worksp > ace/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/ > static/images/users/cc/workspace/news > tore/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newstore > /src/store/static/images/users/cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src > /store/static/images/users/cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src/sto > re/static/images/users/cc/workspace/newstore/src/store/static/images/ > users/cc/workspace/newstore/src/store/s > tatic/images/users/cc/workspace/newstore/src/store/static/images/ > users/ > cc/workspace/newstore/src/store/stati > c/images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/im > ages/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images > /users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images/use > rs/cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/m > cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc > c/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/ > src/store/static/images/users/cc/work > space/newstore/src/store/static/images/users/cc/workspace/newstore/ > src/ > store/static/images/users/cc/workspac > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/static/images/users/cc/workspace/ne > wstore/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newsto > re/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newstore/s > rc/store/static/images/users/cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src/s > tore/static/images/users/cc/workspace/newstore/src/store/static/ > images/ > users/cc/workspace/newstore/src/store > /static/images/users/cc/workspace/newstore/src/store/static/images/ > users/cc/workspace/newstore/src/store/sta > tic/images/users/cc/workspace/newstore/src/store/static/images/users/ > cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/imag > es/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images/u > sers/cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users > /cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/mar > uchan/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/ > n/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc/wo > rkspace/newstore/src/store/static/images/users/cc/workspace/newstore/ > src/store/static/images/users/cc/worksp > ace/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/ > static/images/users/cc/workspace/news > tore/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newstore > /src/store/static/images/users/cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src > /store/static/images/users/cc/workspace/newstore/src/store/static/ > images/users/cc/workspace/newstore/src/sto > re/static/images/users/cc/workspace/newstore/src/store/static/images/ > users/cc/workspace/newstore/src/store/s > tatic/images/users/cc/workspace/newstore/src/store/static/images/ > users/ > cc/workspace/newstore/src/store/stati > c/images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/im > ages/users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images > /users/cc/workspace/newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images/use > rs/cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/m > cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc > cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/src/store/static/images/users/cc/ > workspace/newstore/src/store/static/images/users/cc/workspace/ > newstore/ > src/store/static/images/users/cc/work > space/newstore/src/store/static/images/users/cc/workspace/newstore/ > src/ > store/static/images/users/cc/workspac > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > store/static/images/users/cc/workspace/ne > wstore/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newsto > re/src/store/static/images/users/cc/workspace/newstore/src/store/ > static/images/users/cc/workspace/newstore/s > rc/store/static/images/productimage-picture-neat- > book-2_jpg_280x280_q85.jpg HTTP/1.1" 302 0 > > Again, not everyone develops in Mac OS X and Linux and some people out > there actually do prefer Windows as a Desktop OS. I understand this > is a small project with only a handful of adopters but I really would > like some pointers as to where to start looking for this problem. > > Debugging in python isn't so easy and the execution path hops around > everywhere. I am quite sure the code that is breaking thumbnails on > Windows is code in Satchmo as I have used sorl-thumbnails in many > projects. > > If the author can kindly point out which modules use the facilities I > can take a look at the code and see if I can find the issue. Seeing > that the other people with this problem aren't replying I assume they > have moved on to other projects as well. > > > > > On Dec 9, 9:54 am, cc <[email protected]> wrote: > > Am I doing this on MEDIA_ROOT in settings.py? Still didn't work. I > > don't know how the thumbnail path generation code works, I have been > > trying to debug this for a week already, I'm very eager to start > > working with Satchmo. I'm running 1.0_pre and just `hg up`ed last > > night. > > > > I have tried every possible MEDIA_ROOT using backslahses, slashes, > > trailing slashes, no trailing slashes, uppercase and lowercase C:, > > etc.. all to no avail. If you could possible explain the code path > > that generates the thumbnail paths it might help me debug it on my > > side. I put print statements in the satchmo_utils.thumbnail.utils > > functions and they don't even print.. I thought you were using > > sorl_thumbnail. I have used sorl_thumbnail in the past without > > issues, but for some reason there's something else going on here with > > Satchmo. > > > > Any ideas are appreciated. Thanks. > > > > On Dec 9, 7:43 am, Chris Moffitt <[email protected]> wrote: > > > > > This does nothing for you? > > > > > os.path.normcase(os.path.normpath(path)).replace('\\', '/') > > > > > Remove your trailing slash from your directory too. > > > > > -Chris > > > > > On Tue, Dec 8, 2009 at 11:54 PM, cc <[email protected]> wrote: > > > > Tried setting MEDIA_ROOT to r'C:\prj\static\', r'c:\prj\static\', > 'c:/ > > > > prj/static/', 'C:/prj/static/' in the clonesatch.py installation and > > > > all thumbnail images have urls like '/static/c:/prj/static/ > > > > productimage-picture-default_jpg_85x85_q85.jpg' > > > > > > Not sure what advice in the above ticket to try but I'm not getting > > > > anywhere with this issue. > > > > > > On Dec 8, 8:00 pm, Chris Moffitt <[email protected]> wrote: > > > > > Do the solutions identified in this ticket help you out? > > > > > > > > http://bitbucket.org/chris1610/satchmo/issue/783/dirname-and-media_ro... > > > > > > > Let us know if it works so we can get it incorporated in trunk. > > > > > > > -Chris > > > > > > > On Tue, Dec 8, 2009 at 8:47 AM, M <[email protected]> wrote: > > > > > > Hi, > > > > > > > > I am developing under Vista and have encountered the same problem > > > > > > also. The problem appears to be in the the start up scripts - > > > > > > basically it seems to run four times! For example with some print > > > > > > statements added in settings.py and localsettings.py I get: > > > > > > > > D:\temp\debug_store\store>python manage.py runserver 8001 > > > > > > MEDIA_ROOT: D:\temp\debug_store\store\static\ > > > > > > DATABASE_NAME: D:\temp\debug_store\store\simple.db > > > > > > MEDIA_ROOT: D:\temp\debug_store\store\..\store\static\ > > > > > > DATABASE_NAME: D:\temp\debug_store\store\simple.db > > > > > > MEDIA_ROOT: D:\temp\debug_store\store\static\ > > > > > > DATABASE_NAME: D:\temp\debug_store\store\simple.db > > > > > > MEDIA_ROOT: D:\temp\debug_store\store\..\store\static\ > > > > > > DATABASE_NAME: D:\temp\debug_store\store\simple.db > > > > > > Validating models... > > > > > > . > > > > > > . > > > > > > . > > > > > > > > Note that after the first pass it modifies the MEDIA_ROOT > stupidly - > > > > > > which inturn breaks the utils library in satchmo_utils.thumbnail. > > > > > > Namely the _get_path_from_url method. > > > > > > > > Any thoughts on why the settings file is evaluated 4 times? > > > > > > > > Regards, > > > > > > > > Michael > > > > > > > > On Dec 1, 9:05 am, cc <[email protected]> wrote: > > > > > > > Actually, this problem is still present. I have tried all > > > > > > > combinations with 0.9 and no matter what, I can't get the > images to > > > > > > > show up. Is your dev environment in UNIX? I don't know if > this is a > > > > > > > sorl-thumbnail problem or satchmo related. Any insight is > greatly > > > > > > > appreciated. > > > > > > > > > Also, when I upload an image it puts it in the db as /images/ > > > > > > > XXXXXX.jpg.. is this correct or should it be the full absolute > path? > > > > > > > When I try to delete an image it says Access Denied trying to > delete > > > > / > > > > > > > images/.... > > > > > > > > > On Nov 28, 2:40 pm, cc <[email protected]> wrote: > > > > > > > > > > Figured out the problem. It is because os.path.dirname() in > > > > windows > > > > > > > > generated C:/ instead of c:/ which sorl-thumbnail uses to > determine > > > > > > > > the relative path. > > > > > > > > > > On Nov 28, 1:37 pm, cc <[email protected]> wrote: > > > > > > > > > > > I noticed the full path to the image is being stored in the > > > > table. > > > > > > I > > > > > > > > > thought only the relative path to MEDIA_ROOT should be > stored? > > > > > > > > > > > On Nov 27, 9:03 pm, cc <[email protected]> wrote: > > > > > > > > > > > > Hi Chris, > > > > > > > > > > > > Not sure if that is really the problem, I think > something > > > > else > > > > > > might > > > > > > > > > > be at work here.. this is what I get for any request on > > > > thumbnail > > > > > > > > > > URLs: > > > > > > > > > > > > [27/Nov/2009 21:00:11] "GET > > > > > > /static/c:/users/cc/workspace/newstore/src/ > > > > > > > > > > store/static/images/users/cc/workspac > > > > > > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > > > > > > > > > > store/static/images/users/cc/workspace/ne > > > > > > > > > wstore/src/store/static/images/users/cc/workspace/newstore/src/store/ > > > > > > > > > > static/images/users/cc/workspace/newsto > > > > > > re/src/store/static/images/users/cc/workspace/newstore/src/store/ > > > > > > > > > > static/images/users/cc/workspace/newstore/s > > > > > > > > > rc/store/static/images/users/cc/workspace/newstore/src/store/static/ > > > > > > > > > > images/users/cc/workspace/newstore/src/s > > > > > > > > > tore/static/images/users/cc/workspace/newstore/src/store/static/images/ > > > > > > > > > > users/cc/workspace/newstore/src/store > > > > > > /static/images/users/cc/workspace/newstore/src/store/static/images/ > > > > > > > > > > users/cc/workspace/newstore/src/store/sta > > > > > > > > > tic/images/users/cc/workspace/newstore/src/store/static/images/users/ > > > > > > > > > > cc/workspace/newstore/src/store/static/ > > > > > > > > > images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > > > > > > > workspace/newstore/src/store/static/imag > > > > > > es/users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > > > > > > > workspace/newstore/src/store/static/images/u > > > > > > > > > sers/cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users > > > > > > /cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users/mar > > > > > > c/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users/cc > > > > > > n/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users/cc/wo > > > > > > > > > rkspace/newstore/src/store/static/images/users/cc/workspace/newstore/ > > > > > > > > > > src/store/static/images/users/cc/worksp > > > > > > > > > ace/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > > > > > > > > > > store/static/images/users/cc/workspace/ > > > > > > > > > newstore/src/store/static/images/users/cc/workspace/newstore/src/store/ > > > > > > > > > > static/images/users/cc/workspace/news > > > > > > tore/src/store/static/images/users/cc/workspace/newstore/src/store/ > > > > > > > > > > static/images/users/cc/workspace/newstore > > > > > > > > > /src/store/static/images/users/cc/workspace/newstore/src/store/static/ > > > > > > > > > > images/users/cc/workspace/newstore/src > > > > > > /store/static/images/users/cc/workspace/newstore/src/store/static/ > > > > > > > > > > images/users/cc/workspace/newstore/src/sto > > > > > > > > > re/static/images/users/cc/workspace/newstore/src/store/static/images/ > > > > > > > > > > users/cc/workspace/newstore/src/store/s > > > > > > > > > tatic/images/users/cc/workspace/newstore/src/store/static/images/users/ > > > > > > > > > > cc/workspace/newstore/src/store/stati > > > > > > > > > c/images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > > > > > > > workspace/newstore/src/store/static/im > > > > > > ages/users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > > > > > > > workspace/newstore/src/store/static/images > > > > > > > > > > > /users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > > > > > > > workspace/newstore/src/store/static/images/use > > > > > > > > > rs/cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users/m > > > > > > cc/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users/cc > > > > > > c/workspace/newstore/src/store/static/images/users/cc/workspace/ > > > > > > > > > > newstore/src/store/static/images/users/cc/ > > > > > > > > > workspace/newstore/src/store/static/images/users/cc/workspace/newstore/ > > > > > > > > > > src/store/static/images/users/cc/work > > > > > > > > > space/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > > > > > > > > > > store/static/images/users/cc/workspac > > > > > > e/newstore/src/store/static/images/users/cc/workspace/newstore/src/ > > > > > > > > > > store/static/images/users/cc/workspace/ne > > > > > > > > > wstore/src/store/static/images/users/cc/workspace/newstore/src/store/ > > > > > > > > > > static/images/users/cc/workspace/newsto > > > > > > re/src/store/static/images/users/cc/workspace/newstore/src/store/ > > > > > > > > > > static/images/users/cc/workspace/newstore/s > > > > > > > > > rc/store/static/images/users/cc/workspace/newstore/src/store/static/ > > > > > > > > > > images/users/cc/workspace/newstore/src/s > > > > > > > > > tore/static/images/users/cc/workspace/newstore/src/store/static/images/ > > > > > > > > > > users/cc/workspace/newstore/src/store > > > > > > /static/images/users/cc/workspace/newstore/src/store/static/images/ > > > > > > > > > > users/cc/workspace/newstore/src/store/sta > > > > > > > > > tic/images/users/cc/workspace/newstore/src/store/static/images/users/ > > > > > > > > > > cc/workspace/newstore/src/store/static/ > > > > > > > > > images/users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > > > > > > > workspace/newstore/src/store/static/imag > > > > > > es/users/cc/workspace/newstore/src/store/static/images/users/cc/ > > > > ... > > > > read more ยป > > -- > > You received this message because you are subscribed to the Google Groups > "Satchmo users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<satchmo-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/satchmo-users?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
