CreeperCreative / photograbber

Automatically exported from code.google.com/p/photograbber
Other
0 stars 0 forks source link

can't use pathnames containing non-ASCII characters #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- What steps will reproduce the problem?
1. Create a directory containing non-ASCII characters, say `~/fööbär'.
2. Start photograpper, select a name and initiate the download.
3. pg asks you, where to save the downloaded photos to. Choose the path from 
step 1.

- What is the expected output?
pg should download the photos to that path as with any purely ASCII pathname.

- What do you see instead?
The file dialog closes and the applications returns to the state before 
initiating the download (step 2). The status bas doesn't indicate an ongoing 
download and the name and options selection isn't greyed out. Click on the 
download button brings up the file dialog again.
Python prints an error message and stacktrace to stderr for 
`tkDirectoryChooser.py:44' in `askdirectory' complaining about characters it 
cannot decode from ascii.

- What version of the product are you using? On what operating system?
SVN revision 85 on Linux (x86_64, Ubuntu 10.10) with Python 2.6.6

I attached a patch that makes askdirectory use the default file system encoding 
instead of python's default encoding when encoding the pathname from the file 
dialog. I don't know, if this works for other operating systems or with py2app. 
According to http://docs.python.org/library/sys.html#sys.getfilesystemencoding 
it should, though I'm unsure what the described behaviour implies for Windows 
NT systems and I'm to lazy to set up python on my Windows box to test it.

Additionally I changed the variadic method invocation via `apply' in that line 
to a non-deprecated syntax (see 
http://docs.python.org/library/functions.html#apply ).

Original issue reported on code.google.com by maltewo...@web.de on 7 Mar 2011 at 1:39

Attachments:

GoogleCodeExporter commented 9 years ago
I will look into including this and testing on windows. Thank you for your work.

Original comment by to...@ourbunny.com on 19 Oct 2011 at 2:04

GoogleCodeExporter commented 9 years ago
I get an error message when applying the patch:

 patch < pg-unicode_paths.patch
patching file tkDirectoryChooser.py
Hunk #1 FAILED at 22.
patch: **** malformed patch at line 24: \ No newline at end of file

If I remove the malformed line from the patch, it still does not work:

patch < pg-unicode_paths.patch
patching file tkDirectoryChooser.py
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 40.
2 out of 2 hunks FAILED -- saving rejects to file tkDirectoryChooser.py.rej

Can someone please just post the complete patched file so I have a workaround 
for now?

Original comment by reik...@gmail.com on 8 Nov 2011 at 5:10

GoogleCodeExporter commented 9 years ago
Well, that's probably because you try to apply it against r86. Take a look at 
its commit message: http://code.google.com/p/photograbber/source/detail?r=86

Original comment by maltewo...@web.de on 9 Nov 2011 at 12:07

GoogleCodeExporter commented 9 years ago
This should be fixed in the latest version (2.100).  Switched to Qt for GUI 
instead of Tk.  http://www.photograbber.org for the latest.

Original comment by to...@ourbunny.com on 16 Jun 2013 at 3:59