AttributeError: 'NoneType' object has no attribute 'split'   ,same
error

why i can't see my new post ?

""""

My APP is retrieve all of a user's albums  and query to retrieve all
of the photo belonging to username in the albumname album by using
GetUserFeed method.

But in recent days, It often get same error, as follow:

"""""

Traceback (most recent call last):
  File "C:\Users\Happy\ftv365\manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\Python25\Lib\site-packages\django\core\management
\__init__.py", line
340, in execute_manager
    utility.execute()
  File "C:\Python25\Lib\site-packages\django\core\management
\__init__.py", line
295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python25\Lib\site-packages\django\core\management\base.py",
line 195,
 in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python25\Lib\site-packages\django\core\management\base.py",
line 222,
 in execute
    output = self.handle(*args, **options)
  File "C:\Users\Happy\mysite\picasso\management\commands
\picasa_user.py", line
11, in handle
  File "C:\Users\Happy\ftv365\picasso\utils.py", line 54, in
picasa_user
    feed_photo = gd_client.GetFeed(feed_photo_url)

  File "C:\Python25\Lib\site-packages\gdata\photos\service.py", line
182, in Get
Feed
    return self.Get(uri, converter=gdata.photos.AnyFeedFromString)
  File "C:\Python25\Lib\site-packages\gdata\service.py", line 518, in
Get
    return converter(result_body)
  File "C:\Python25\Lib\site-packages\gdata\photos\__init__.py", line
1083, in A
nyFeedFromString
    return atom._CreateClassFromElementTree(feed_class, tree)
  File "C:\Python25\Lib\site-packages\atom\__init__.py", line 127, in
_CreateCla
ssFromElementTree
    target._HarvestElementTree(tree)
  File "C:\Python25\Lib\site-packages\atom\__init__.py", line 145, in
_HarvestEl
ementTree
    self._ConvertElementTreeToMember(child)
  File "C:\Python25\Lib\site-packages\gdata\photos\__init__.py", line
147, in _C
onvertElementTreeToMember
    namespace, kind = category.get('term').split('#')
AttributeError: 'NoneType' object has no attribute 'split'


"""

 feed_photo_url is :  /data/feed/api/user/sonny78723/album/Freja?
kind=photo&thumbsize=320u&imgmax=576
 If I repeated try to run,sometimes  GetFeed OK.
 and sometimes GetUserFeed is abnormal too.
 Two weeks ago,all Get Feed entry work is normal


"""

C:\Users\Happy\ftv365>manage.py shell
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> feed_photo_url='/data/feed/api/user/sonny78723/album/Freja?kind=photo&thumbs
ize=320u&imgmax=576'
>>> print feed_photo_url
/data/feed/api/user/sonny78723/album/Freja?
kind=photo&thumbsize=320u&imgmax=576
>>> from gdata.photos.service import PhotosService
>>> feed_photo = gd_client.GetFeed(feed_photo_url)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
NameError: name 'gd_client' is not defined
>>> gd_client = PhotosService()
>>> feed_photo = gd_client.GetFeed(feed_photo_url)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python25\Lib\site-packages\gdata\photos\service.py", line
182, in Get
Feed
    return self.Get(uri, converter=gdata.photos.AnyFeedFromString)
  File "C:\Python25\Lib\site-packages\gdata\service.py", line 518, in
Get
    return converter(result_body)
  File "C:\Python25\Lib\site-packages\gdata\photos\__init__.py", line
1077, in A
nyFeedFromString
    namespace, kind = category.get('term').split('#')
AttributeError: 'NoneType' object has no attribute 'split'
>>> feed_photo = gd_client.GetFeed(feed_photo_url)
>>> print feed_photo
<?xml version='1.0' encoding='UTF-8'?>
<ns0:feed xmlns:ns0="http://www.w3.org/2005/Atom";><ns1:name
xmlns:ns1="http://sc
hemas.google.com/photos/2007">Freja</ns1:name><ns1:nickname
xmlns:ns1="http://sc
hemas.google.com/photos/2007">shine</ns1:nickname><ns0:category
scheme="http://s
chemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/
2007#album
" /><ns0:id>http://picasaweb.google.com/data/feed/api/user/sonny78723/
album/Frej
a</ns0:id><ns0:generator uri="http://picasaweb.google.com/";
version="1.00">Picas
aweb</ns0:generator><ns1:startIndex xmlns:ns1="http://a9.com/-/spec/
opensearchrs
s/1.0/">1</ns1:startIndex><ns1:location xmlns:ns1="http://
schemas.google.com/pho
tos/2007" /><ns1:id xmlns:ns1="http://schemas.google.com/photos/
2007">5291339763
286642257</ns1:id><ns0:icon>http://lh5.ggpht.com/_okGfIAQ_YRE/
SW6deuCZjlE/AAAAAA
AAB1Y/uMo_EclkI_4/s160-c/Freja.jpg</ns0:icon><ns0:subtitle /
><ns1:timestamp xmln
s:ns1="http://schemas.google.com/photos/2007";>1232006400000</
ns1:timestamp><ns0:
author><ns0:name>shine</ns0:name><ns0:uri>http://picasaweb.google.com/
sonny78723
</ns0:uri></ns0:author><ns0:link href="http://picasaweb.google.com/
data/feed/api
/user/sonny78723/albumid/5291339763286642257" rel="http://
schemas.google.com/g/2
005#feed" type="application/atom+xml" /><ns0:link href="http://
picasaweb.google.
com/sonny78723/Freja" rel="alternate" type="text/html" /><ns0:link
href="http://
picasaweb.google.com/s/c/bin/slideshow.swf?
host=picasaweb.google.com&amp;RGB=0x0
00000&amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi
%2Fuser%2Fso
nny78723%2Falbumid%2F5291339763286642257%3Falt%3Drss" rel="http://
schemas.google
.com/photos/2007#slideshow" type="application/x-shockwave-flash" /
><ns0:link hre
f="http://picasaweb.google.com/lh/reportAbuse?
uname=sonny78723&amp;aid=529133976
3286642257" rel="http://schemas.google.com/photos/2007#report";
type="text/html"
/><ns0:link href="http://picasaweb.google.com/data/feed/api/user/
sonny78723/albu
mid/5291339763286642257?start-index=1&amp;max-
results=1000&amp;kind=photo&amp;im
gmax=576&amp;thumbsize=320u" rel="self" type="application/atom+xml" /
><ns0:updat
ed>2009-02-27T01:51:31.000Z</ns0:updated><ns1:numphotos
xmlns:ns1="http://schema
s.google.com/photos/2007">428</ns1:numphotos><ns1:totalResults
xmlns:ns1="http:/
/a9.com/-/spec/opensearchrss/1.0/">428</
ns1:totalResults><ns1:commentingEnabled
xmlns:ns1="http://schemas.google.com/photos/2007";>true</
ns1:commentingEnabled><n
s1:access xmlns:ns1="http://schemas.google.com/photos/2007";>public</
ns1:access><
ns1:commentCount xmlns:ns1="http://schemas.google.com/photos/2007";>0</
ns1:commen
tCount><ns1:itemsPerPage xmlns:ns1="http://a9.com/-/spec/opensearchrss/
1.0/">100
0</ns1:itemsPerPage><ns0:title>freja</ns0:title><ns0:rights>public</
ns0:rights><
ns1:user xmlns:ns1="http://schemas.google.com/photos/2007";>sonny78723</
ns1:user>
<ns1:allowPrints xmlns:ns1="http://schemas.google.com/photos/
2007">true</ns1:all
owPrints><ns1:allowDownloads xmlns:ns1="http://schemas.google.com/
photos/2007">t
rue</ns1:allowDownloads></ns0:feed>
>>>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to