-
Notifications
You must be signed in to change notification settings - Fork 38
Uploading without creating sets [OS X] #37
Comments
Hmm, looks like it can't write the shelve file. maybe there are some differences in the semantics if it's already opened on Mac? The stack trace looks promising, I'll take a look. |
I can confirm this issue on Yosemite with the same python version (2.7.8_2 installed via homebrew), and with exactly the same stacktrace as in the original post by @madswesti. Not sure if this has any relation to the root cause, but the tag that the script is generating contains hashes and forward slashes, i.e. Update: apparently it is a known issue on OSX: urllib3/urllib3#63 - that ticket contains a dirty workaround. What I ended up doing was an even dirtier return in tags2sets.py:line 92:
|
I don't think the hashes and forward slashes are the issue. I'm currently running the script on my Linux server and everything works with no issues and images are tagged as "#path/to/file/filename.JPG". I think it's related to gdbm, but thats just a hunch. |
@richq: I think I may have solved it. By adding "self.uploaded.close()" at the end of the "upload" function in uploadr.py. Both sets and tags seems to work. |
The upload runs perfectly, but when it tries to create a set, I get the following stack trace:
Traceback (most recent call last):
File "./folders2flickr", line 8, in
f2flickr.uploadr.main()
File "/Users/username/folders2flickr/f2flickr/uploadr.py", line 628, in main
tags2set.createSets(uploadedNow, HISTORY_FILE)
File "/Users/username/folders2flickr/f2flickr/tags2set.py", line 88, in createSets
uploaded = shelve.open( historyFile )
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 223, in init
Shelf.init(self, anydbm.open(filename, flag), protocol, writeback)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/anydbm.py", line 85, in open
return mod.open(file, flag, mode)
gdbm.error: (35, 'Resource temporarily unavailable')
The debug.log says:
2014-10-18 01:10:04,118 DEBUG successful.
2014-10-18 01:10:04,121 DEBUG tags2set: Started tags2set
EDIT
I'm just realising that it may not be completely apparent for everybody. I'm on OS X Yosemite with python .7.8 installed via Homebrew.
The text was updated successfully, but these errors were encountered: