Description of problem: The Picasa service of googlecl fails to upload photos that have uppercase filenames. Renaming the photos to have lowercase extensions makes it possible to upload them. Version-Release number of selected component (if applicable): googlecl-0.9.9 How reproducible: 100% Steps to Reproduce: 1. rename a photo to something.JPG 2. google picasa -n 'Drop Box' post something.JPG Actual results: $ google picasa -n 'Drop Box' post hoppa.JPG Loading file hoppa.JPG to album Drop Box Failed to upload hoppa.JPG. (602: Accepted content types: ['image/bmp', 'image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/mpeg', 'image/mpeg4', 'image/3gpp', 'image/quicktime', 'image/mp4', 'image/x-ms-wmv', 'image/avi']) Expected results: Upload succeeds. Additional info: The problem seems to be that googlecl/picasa/service.py passes the content_type on to the gdata API. googlecl fails to standardize the content_type and the API does a more strict test, causing the upload to fail. Debugging and some extra checks below: $ python -m pdb /usr/bin/google picasa -n 'Drop Box' post hoppa.JPG > /usr/bin/google(43)<module>() -> """ (Pdb) b /usr/lib/python2.6/site-packages/gdata/photos/service.py:393 Breakpoint 1 at /usr/lib/python2.6/site-packages/gdata/photos/service.py:393 (Pdb) r Loading file hoppa.JPG to album Drop Box > /usr/lib/python2.6/site-packages/gdata/photos/service.py(393)InsertPhoto() -> 'body':'This is not a valid content type: %s' % content_type, (Pdb) bt /usr/lib64/python2.6/bdb.py(372)run() -> exec cmd in globals, locals <string>(1)<module>() /usr/bin/google(577)<module>() -> main() /usr/bin/google(571)main() -> run_once(options, args) /usr/bin/google(418)run_once() -> task.run(client, options, args) /usr/lib/python2.6/site-packages/googlecl/picasa/service.py(406)_run_post() -> user=options.owner or options.user) /usr/lib/python2.6/site-packages/googlecl/picasa/service.py(273)insert_media_list() -> content_type=content_type) /usr/lib/python2.6/site-packages/gdata/photos/service.py(469)InsertPhotoSimple() -> content_type) > /usr/lib/python2.6/site-packages/gdata/photos/service.py(393)InsertPhoto() -> 'body':'This is not a valid content type: %s' % content_type, (Pdb) print content_type image/JPG (Pdb) print filename_or_handle hoppa.JPG (Pdb) import mimetypes as m (Pdb) m.init() (Pdb) m.guess_type(filename_or_handle) ('image/jpeg', None)
Created attachment 575949 [details] Proposed patch, backported from the upstream version Tested with build https://koji.fedoraproject.org/koji/taskinfo?taskID=3970606 Test done: $ google picasa -n 'Drop Box' post hoppa.JPG Loading file hoppa.JPG to album Drop Box $ Result: Photo got uploaded successfully.
googlecl-0.9.9-3.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/googlecl-0.9.9-3.el6
Filed an errata for easy access to allow other to test/use. The patch is not upstream yet. I do not have any intention to mark this as stable until the patch gets accepted.
Package googlecl-0.9.9-3.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing googlecl-0.9.9-3.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-0988/googlecl-0.9.9-3.el6 then log in and leave karma (feedback).
Tried to get in touch with the developers again: - http://groups.google.com/group/googlecl-discuss/browse_thread/thread/baa6b94ebf5dbdd0#
googlecl is getting retired from EPEL-6, this update will not be made available.