Skip to content

Instantly share code, notes, and snippets.

@jed
Created December 26, 2010 00:23
Show Gist options
  • Save jed/755123 to your computer and use it in GitHub Desktop.
Save jed/755123 to your computer and use it in GitHub Desktop.
error in flickrtouchr when trying to download a picture with a slash in the title
Traceback (most recent call last):
File "flickrtouchr/flickrtouchr.py", line 368, in <module>
inodes[photoid] = getphoto(imgurl, target)
File "flickrtouchr/flickrtouchr.py", line 170, in getphoto
fh = open(filename, "w")
IOError: [Errno 2] No such file or directory: u"japan '09/20091002220101-3975078266_o-vanilla ice cream w/ coffee @ sushi sen, nishi azabu.jpg"
@poswald
Copy link

poswald commented Dec 26, 2010

At line 343 of tominsam/flickrtouchr try this instead:

imgname = "-" + photo.getAttribute("title").replace(os.sep, "?")

This will put a ? into the path instead of /

@jed
Copy link
Author

jed commented Dec 26, 2010

ah, nice.

i'm going with this:

imgname = "-" + photo.getAttribute("title").replace(os.sep, ":")

because os x will display colons as slashes.

thanks, paul!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment