salimoha / googlecl

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

"AttributeError: 'int' object has no attribute 'reason'" when trying to upload many files to picasa. Error handling missing a case? #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When i try to upload large albums (50+ files) it ALWAYS ends with an error 
after 40-60 files:

alot of files here................. 
Loading file renovera bubblan/IMGP2809.JPG to album renovera bubblan
Loading file renovera bubblan/IMGP2810.JPG to album renovera bubblan
Loading file renovera bubblan/IMGP2811.JPG to album renovera bubblan
 Traceback (most recent call last):
   File "/usr/bin/google", line 463, in <module>
     main()
   File "/usr/bin/google", line 457, in main
     run_once(options, args)
   File "/usr/bin/google", line 356, in run_once
     task.run(client, options, args)
   File "/usr/lib/pymodules/python2.6/googlecl/picasa/service.py", line 344, in _run_post
     client.InsertPhotoList(album, args, tags=options.tags)
   File "/usr/lib/pymodules/python2.6/googlecl/picasa/service.py", line 220, in insert_photo_list
    err.args[0].reason,
 AttributeError: 'int' object has no attribute 'reason'

Im trying to write a script that automaticly uploads all my folders, but it 
does only work for about 50 photos before throwing error about the 'reason' 
attribute is missing :( 

Im running version 0.9.7

Original issue reported on code.google.com by jonas.fa...@gmail.com on 30 Jun 2010 at 2:45

GoogleCodeExporter commented 9 years ago
Could you apply the patch in Issue 86 and then try again? You should get an 
actual error message instead of throwing the error.

Or, run the code from the svn repository, which has that patch applied.

Original comment by tom.h.mi...@gmail.com on 30 Jun 2010 at 3:59

GoogleCodeExporter commented 9 years ago
Tried a few times with same photos and it worked all the time, does the picasa 
service.py have some sort of autoretry depending on the error thrown? 

If thats the case it explains why it works now with corrent error handleing

Original comment by jonas.fa...@gmail.com on 30 Jun 2010 at 10:24

GoogleCodeExporter commented 9 years ago
Hm. It should still fail on the same file, but print an error message and keep 
going with the rest of the files. Did you see any messages about a failure?

You may want to try 

$ google picasa [your command] > picasa_upload_output.txt

to re-direct the output to a file, and then search the file for "Failed to 
upload" just to be sure they all got there.

Original comment by tom.h.mi...@gmail.com on 30 Jun 2010 at 2:44

GoogleCodeExporter commented 9 years ago

Original comment by tom.h.mi...@gmail.com on 16 Jul 2010 at 2:45

GoogleCodeExporter commented 9 years ago
After i fixed the googlecl so it printed the error messages i just got HTTP 500 
sometimes... Maybe there is need to build in some retry handling? 

However i wrapped up my own php cli script to handle things and retry on any 
errors. 

I believe this ticket can be closed since the error handling in googlecl for 
picasa is working. (but i do think it should retry a few times...) 

Original comment by jonas.fa...@gmail.com on 16 Jul 2010 at 2:49

GoogleCodeExporter commented 9 years ago
The AttributeError was cleared up by Issue 86

Automatic retries have been implemented in the trunk. (Issue 167 and Issue 228)

Original comment by tom.h.mi...@gmail.com on 30 Oct 2010 at 12:21