jijo-paulose / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

UnparsableUrlObject: Unable to parse url parameter because it was not a string or atom.url.Url with gdata-1.2.2 #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I recently upgraded userprofile from 0.5 to 0.6 and it works great with Django 
1.0 except the Picasa Avatar photo 
search part.

Steps to reproduce:
1. Visit /accounts/profile/edit/avatar/search/
2. Do a search on PicasaWeb

Like 0.5, I expect to see a list of thumbnails. Instead I got the following 
stacktrace:
It appears that we are expecting a URL but instead we got a URI. 

I probably can debug further but if you have seen this and know the fix, pls 
let me know. Thanks
-Aaron

Traceback (most recent call last):
  File "/usr/local/src/djtrunk/django/core/servers/basehttp.py", line 635, in __call__
    return self.application(environ, start_response)
  File "/usr/local/src/djtrunk/django/core/handlers/wsgi.py", line 239, in __call__
    response = self.get_response(request)
  File "/usr/local/src/djtrunk/django/core/handlers/base.py", line 128, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)
  File "/usr/local/src/djtrunk/django/core/handlers/base.py", line 148, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/usr/local/src/djtrunk/django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/src/djtrunk/django/contrib/auth/decorators.py", line 67, in __call__
    return self.view_func(request, *args, **kwargs)
  File "/usr/local/src/userprofile-trunk/userprofile/views.py", line 97, in searchimages
    feed = gd_client.SearchCommunityPhotos("%s&thumbsize=72c" % keyword.split(" ")[0], limit='48')
  File "/usr/lib/python2.4/site-packages/gdata/photos/service.py", line 290, in SearchCommunityPhotos
    return self.GetFeed(uri, limit=limit)
  File "/usr/lib/python2.4/site-packages/gdata/photos/service.py", line 182, in GetFeed
    return self.Get(uri, converter=gdata.photos.AnyFeedFromString)
  File "/usr/lib/python2.4/site-packages/gdata/service.py", line 700, in Get
    headers=extra_headers)
  File "/usr/lib/python2.4/site-packages/atom/service.py", line 176, in request
    data=data, headers=all_headers)
  File "/usr/lib/python2.4/site-packages/atom/http_interface.py", line 148, in perform_request
    return http_client.request(operation, url, data=data, headers=headers)
  File "/usr/lib/python2.4/site-packages/atom/http.py", line 86, in request
    raise atom.http_interface.UnparsableUrlObject('Unable to parse url '
UnparsableUrlObject: Unable to parse url parameter because it was not a string 
or atom.url.Url

Original issue reported on code.google.com by waifun...@gmail.com on 7 Nov 2008 at 12:12

GoogleCodeExporter commented 9 years ago
same here. I have the latest release of gdata.py installed via easy_install 
gdata.py

Original comment by ericd...@gmail.com on 10 Nov 2008 at 7:10

GoogleCodeExporter commented 9 years ago
rolling back to older gdata fixes this:
easy_install gdata.py==1.1.1

Original comment by ericd...@gmail.com on 10 Nov 2008 at 8:03

GoogleCodeExporter commented 9 years ago
err, actually I downloaded the tarball: 
http://gdata-python-client.googlecode.com/files/gdata.py-1.1.1.tar.gz

Original comment by ericd...@gmail.com on 10 Nov 2008 at 8:14

GoogleCodeExporter commented 9 years ago
Solved! It was an incompatibility of unicode/str parameter with gdata.photos. 
Thanks
so much for reporting.

Check the latest SVN trunk 

Original comment by david.ru...@gmail.com on 10 Nov 2008 at 7:25