pkolarov / folders2flickr

Automatically exported from code.google.com/p/folders2flickr
7 stars 2 forks source link

Error running the Windows executable - image upload never occurs #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Created a folder called C:\Test\, that has subfolders Subfolder A and 
Subfolder B.  In Subfolder A there is 1 image called 002.jpg.  In Subfolder B, 
as well, there is 1 image called 002.jpg.
2. Set my uploadr.ini file to:

[DEFAULT]

#
# Location to scan for new images (no trailing \)
#
imagedir=C:\Test
#
#   File we keep the history of uploaded images in.
#
history_file=history

#visible 1, invisible 0
public= 0
friend = 0
family = 0

#set this to true if name of the auto generated flickr sets should be only name 
of the last sub folder e.g. Crete when folder is 
d:\testpictures\holidays\Crete\123img.jpg
only_sub_sets  = false

#Start from scratch! If you want to delete first everything you have in your 
Flickr account then set this to true
#This is handy if you messed up your uploads before or just want to start from 
the begining. 
#Once everything is deleted turn this feature off so you wont keep deleting 
your pics in your cron job!
#WARNING!!! IF SET TO true THIS WILL DELETE EVERYTHING (pictures and videos) 
FROM YOUR FLICKR ACCOUNT
#SO BE 100% SURE YOU WANT TO DO THIS!!!!!!!!!!!!!!!!!!
#NOTE: The tool will not start uploading pictures unless this is set to false 
in order to prevent delete-upload-delete-upload loops

remove_all_pics_first = false

3. Ran uploader.exe from the command line.

4. Authorized the app to access my Flickr account.

5. Entered "Y"

6. The output says "history", pauses for about 2 seconds and then shows the 
command line prompt.

7. I look in the error.log and it says the following over and over:

tags2set: Cannot create set 
<type 'exceptions.IndexError'>
tags2set: Cannot edit set 
<type 'exceptions.AttributeError'>
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0001',), <traceback 
object at 0x02875210>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0001',), <traceback 
object at 0x028750F8>)

**I have attached the debug.log and error.log files for your reference.

What is the expected output? What do you see instead?

I'd expect the image files to be uploaded to my Flickr account.  However, it 
still shows that I have zero pictures uploaded.

What version of the product are you using? On what operating system?
Using Folders2Flickr Win EXE v1
Windows 7 (MacBook Pro running Boot Camp)

Please provide any additional information below.
I have a Flickr Pro account.
I have set my privacy settings to the most private, as I'm basically using 
Flickr as a storage backup.  I'm not sure if the privacy settings are creating 
problems with the image uploading...
I also tried using an earlier version of your Windows executable (v0.9), with 
the same result.

Original issue reported on code.google.com by dya...@gmail.com on 17 Aug 2011 at 6:20

Attachments:

GoogleCodeExporter commented 9 years ago
I experimented and put images taken by another camera maker (Sony and Casio) in 
the Subfolder A directory.  When I did so, the images showed up properly in 
Flickr.

However, for pictures taken with my Canon camera, they do not get uploaded to 
Flickr.

Original comment by dya...@gmail.com on 17 Aug 2011 at 6:46

GoogleCodeExporter commented 9 years ago
Same problem here. Tried uploading 4 images taken with a Canon EOS, 2 of them 
upped correctly, others not.

Original comment by pete...@gmail.com on 4 Sep 2011 at 6:34

GoogleCodeExporter commented 9 years ago
The above comment however, occurs to me in debian running 'python uploadr.py' - 
no windows.

Original comment by pete...@gmail.com on 4 Sep 2011 at 6:35

GoogleCodeExporter commented 9 years ago
The photos that I had that didn't upload properly were taken on a Canon 
PowerShot S3 IS. But interestingly enough, pictures that I took on a Canon 
PowerShot A70 (a model from about 9 years ago) uploaded just fine.

I experimented with another camera "maker" (my iPhone 3GS camera) and found 
that images taken with my iPhone 3GS upload just fine.

Original comment by dya...@gmail.com on 9 Sep 2011 at 2:43

GoogleCodeExporter commented 9 years ago
Also uploading batches of pictures from various cameras, and hit the same snag 
as you folks with the Canon Optura400. (I highly doubt it matters, but I'm 
running the python code in Windows.)

Original comment by ThaiB...@gmail.com on 19 Sep 2011 at 8:58

GoogleCodeExporter commented 9 years ago
A workaround is to comment out the Canon exif data handling from exif.py.

About line 1576 in the file exif.py, comment the section out so it looks like 
this:
# Canon
#        if make == 'Canon':
#            self.dump_IFD(note.field_offset, 'MakerNote',
#                          dict=MAKERNOTE_CANON_TAGS)
#            for i in (('MakerNote Tag 0x0001', MAKERNOTE_CANON_TAG_0x001),
#                     ('MakerNote Tag 0x0004', MAKERNOTE_CANON_TAG_0x004)):
#                self.canon_decode_tag(self.tags[i[0]].values, i[1])
#            return

I must admit that I really do now know what consequences this has to the 
uploading of pictures - but it works.

Original comment by pete...@gmail.com on 19 Sep 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Hi Pete,
Thanks for the work-around! It seems to preserve the camera model information 
when a photograph is uploaded, so I have no idea what commenting those lines 
out means either.
Oh well... whatever works :)

Original comment by ThaiB...@gmail.com on 19 Sep 2011 at 9:35

GoogleCodeExporter commented 9 years ago
Could someone upload a new exif.pyc file for me?  I am not a programmer and 
don't know exactly how to modify the exif.py file and generate a new exif.pyc.

Thanks!

Original comment by dya...@gmail.com on 20 Sep 2011 at 5:39

GoogleCodeExporter commented 9 years ago
I'm not sure if my exif.pyc file will work for you. We can read the same .py 
code, but once it is compiled (hence the "c" in .pyc) on our individual 
computers, it is specific to the machine. I'll upload it anyway in case I am 
completely wrong about this.

If it doesn't work, maybe it's time to download python :)

Original comment by ThaiB...@gmail.com on 20 Sep 2011 at 6:49

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for posting, but you're right: when I slap that exif.pyc file into my 
library.zip archive and then run uploadr.exe, it shows an import error and says 
that it cannot find exif.py.

Guess I'll have to figure out how to compile.

Original comment by dya...@gmail.com on 24 Sep 2011 at 12:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Windows EXE 1.0 does not work for me either.  Sets not created; images not 
uploaded.  I'd love to get this to work since i just got Flickr Pro and would 
like to upload my 75GB of photos already organized in folders!  Thanks for the 
help.

ERROR.LOG:
tags2set: Cannot create set 
<type 'exceptions.IndexError'>
tags2set: Cannot edit set 
<type 'exceptions.AttributeError'>
tags2set: Cannot create set 
<type 'exceptions.IndexError'>
tags2set: Cannot edit set 
<type 'exceptions.AttributeError'>
tags2set: Cannot create set 
<type 'exceptions.IndexError'>
tags2set: Cannot edit set 
<type 'exceptions.AttributeError'>
(<type 'exceptions.MemoryError'>, MemoryError(), <traceback object at 
0x0249DA30>)
(<type 'exceptions.MemoryError'>, MemoryError(), <traceback object at 
0x024A0468>)
(<type 'exceptions.MemoryError'>, MemoryError(), <traceback object at 
0x024A81C0>)

ERRORS in DEBUG.LOG:
2012-11-10 14:55:15,062 DEBUG Getting EXIF for D:\Flickr\TestDir\IMG00001.JPG
2012-11-10 14:55:15,608 ERROR (<type 'exceptions.MemoryError'>, MemoryError(), 
<traceback object at 0x024A81C0>)

Original comment by shigad...@gmail.com on 10 Nov 2012 at 8:02

GoogleCodeExporter commented 9 years ago
I faced the same issue yesterday, so I decided to read the source code of 
exif.py in order to implement what is described in comment #6. In the top of 
the source code, there's a comment that points to the project's link 
(http://sourceforge.net/projects/exif-py/) but project was moved to 
https://github.com/ianare/exif-py.
I downloaded the latest version of exif.py, backed up the original one and 
replaced it with the new version (filename must be in lowercase). It worked 
perfectly!

To check if the errors are solved with the new version, you can execute (on a 
problematic picture):

$ python exif.py <filename> (exif.py new version)
$ python exif.py.orig <filename> (where exif.py.orig is the old version. It 
should return a LOT of errors)

Hope it helps!

Original comment by lopezrig...@gmail.com on 28 Jan 2013 at 2:39

GoogleCodeExporter commented 9 years ago
I have had the same issue... and fixed it using the new version 1.2.0 of 
exif-py from 
https://github.com/ianare/exif-py...
I am using Ubuntu 13.04 and actually have 18.000 Fotos uploaded with 
folders2flickr :-)
Give it a try...

Original comment by jensmah...@gmail.com on 13 Jun 2013 at 7:18