Problem with REST and album.get?
timpics
Registered Users Posts: 7 Beginner grinner
A script I wrote some time ago is now returning an error. When I try the url by hand, I see why - the returned XML isn't quite correct. I've pasted the page returned by Firefox below. Any ideas what might be causing this?
For what its worth, there are currently a few galleries in the account I'm checked that were created but are still empty.
Is this intended behavior I need to learn my way around, or is this something that I should expect to be fixed?
Thanks,
-Tim
XML Parsing Error: not well-formed
Location: http://api.smugmug.com/hack/rest/?method=smugmug.albums.get&NickName=gmara&SessionID=af195ef144934d56dda554f8fc9e4eef
Line Number 3, Column 2:<0><AlbumID>1252027</AlbumID><Title>The Frigid Infliction at Bolton Valley - Race Photos!</Title><CategoryID>64908</CategoryID><Category>Races</Category></0><1><AlbumID>1568334</AlbumID><Title>The Bitter Pill 2004 - all</Title><CategoryID>0</CategoryID><Category>Other</Category></1><2><AlbumID>1568332</AlbumID><Title>PPBS 2005 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></2><3><AlbumID>1266416</AlbumID><Title>2004-03-26 Petra Cliffs</Title><CategoryID>8</CategoryID><Category>Events</Category></3><4><AlbumID>1238599</AlbumID><Title>The Frigid Infliction at Bolton Valley - Course Design</Title><CategoryID>64908</CategoryID><Category>Races</Category></4><5><AlbumID>1243455</AlbumID><Title>2005-05-14 Orienteering Clinic</Title><CategoryID>8</CategoryID><Category>Events</Category></5><6><AlbumID>1243439</AlbumID><Title>2005-11-19 Warren Miller</Title><CategoryID>8</CategoryID><Category>Events</Category></6><7><AlbumID>1243434</AlbumID><Title>2006-01-13 Petra and Dinner</Title><CategoryID>8</CategoryID><Category>Events</Category></7><8><AlbumID>1243440</AlbumID><Title>EMS</Title><CategoryID>0</CategoryID><Category>Other</Category></8><9><AlbumID>1238606</AlbumID><Title>Logos</Title><CategoryID>64909</CategoryID><Category>Media</Category></9><10><AlbumID>1568317</AlbumID><Title>The Bitter Pill 2005 - Best Of</Title><CategoryID>64908</CategoryID><Category>Ra
-^
And the raw source code:
<?xml version="1.0" encoding="utf-8" ?><rsp stat="ok">
<method>smugmug.albums.get</method>
<0><AlbumID>1252027</AlbumID><Title>The Frigid Infliction at Bolton Valley - Race Photos!</Title><CategoryID>64908</CategoryID><Category>Races</Category></0><1><AlbumID>1568334</AlbumID><Title>The Bitter Pill 2004 - all</Title><CategoryID>0</CategoryID><Category>Other</Category></1><2><AlbumID>1568332</AlbumID><Title>PPBS 2005 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></2><3><AlbumID>1266416</AlbumID><Title>2004-03-26 Petra Cliffs</Title><CategoryID>8</CategoryID><Category>Events</Category></3><4><AlbumID>1238599</AlbumID><Title>The Frigid Infliction at Bolton Valley - Course Design</Title><CategoryID>64908</CategoryID><Category>Races</Category></4><5><AlbumID>1243455</AlbumID><Title>2005-05-14 Orienteering Clinic</Title><CategoryID>8</CategoryID><Category>Events</Category></5><6><AlbumID>1243439</AlbumID><Title>2005-11-19 Warren Miller</Title><CategoryID>8</CategoryID><Category>Events</Category></6><7><AlbumID>1243434</AlbumID><Title>2006-01-13 Petra and Dinner</Title><CategoryID>8</CategoryID><Category>Events</Category></7><8><AlbumID>1243440</AlbumID><Title>EMS</Title><CategoryID>0</CategoryID><Category>Other</Category></8><9><AlbumID>1238606</AlbumID><Title>Logos</Title><CategoryID>64909</CategoryID><Category>Media</Category></9><10><AlbumID>1568317</AlbumID><Title>The Bitter Pill 2005 - Best Of</Title><CategoryID>64908</CategoryID><Category>Races</Category></10><11><AlbumID>1568321</AlbumID><Title>The Bitter Pill 2005 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></11><12><AlbumID>1568340</AlbumID><Title>The Bitter Pill 2004 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></12><13><AlbumID>1568342</AlbumID><Title>PPBS 2004 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></13></rsp>
(As a side note, is there a way to stop the forum from interpreting < as the beginning of an html tag? Makes pasting xml code kinda ugly without doing a search-replace in an editor first...)
For what its worth, there are currently a few galleries in the account I'm checked that were created but are still empty.
Is this intended behavior I need to learn my way around, or is this something that I should expect to be fixed?
Thanks,
-Tim
XML Parsing Error: not well-formed
Location: http://api.smugmug.com/hack/rest/?method=smugmug.albums.get&NickName=gmara&SessionID=af195ef144934d56dda554f8fc9e4eef
Line Number 3, Column 2:<0><AlbumID>1252027</AlbumID><Title>The Frigid Infliction at Bolton Valley - Race Photos!</Title><CategoryID>64908</CategoryID><Category>Races</Category></0><1><AlbumID>1568334</AlbumID><Title>The Bitter Pill 2004 - all</Title><CategoryID>0</CategoryID><Category>Other</Category></1><2><AlbumID>1568332</AlbumID><Title>PPBS 2005 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></2><3><AlbumID>1266416</AlbumID><Title>2004-03-26 Petra Cliffs</Title><CategoryID>8</CategoryID><Category>Events</Category></3><4><AlbumID>1238599</AlbumID><Title>The Frigid Infliction at Bolton Valley - Course Design</Title><CategoryID>64908</CategoryID><Category>Races</Category></4><5><AlbumID>1243455</AlbumID><Title>2005-05-14 Orienteering Clinic</Title><CategoryID>8</CategoryID><Category>Events</Category></5><6><AlbumID>1243439</AlbumID><Title>2005-11-19 Warren Miller</Title><CategoryID>8</CategoryID><Category>Events</Category></6><7><AlbumID>1243434</AlbumID><Title>2006-01-13 Petra and Dinner</Title><CategoryID>8</CategoryID><Category>Events</Category></7><8><AlbumID>1243440</AlbumID><Title>EMS</Title><CategoryID>0</CategoryID><Category>Other</Category></8><9><AlbumID>1238606</AlbumID><Title>Logos</Title><CategoryID>64909</CategoryID><Category>Media</Category></9><10><AlbumID>1568317</AlbumID><Title>The Bitter Pill 2005 - Best Of</Title><CategoryID>64908</CategoryID><Category>Ra
-^
And the raw source code:
<?xml version="1.0" encoding="utf-8" ?><rsp stat="ok">
<method>smugmug.albums.get</method>
<0><AlbumID>1252027</AlbumID><Title>The Frigid Infliction at Bolton Valley - Race Photos!</Title><CategoryID>64908</CategoryID><Category>Races</Category></0><1><AlbumID>1568334</AlbumID><Title>The Bitter Pill 2004 - all</Title><CategoryID>0</CategoryID><Category>Other</Category></1><2><AlbumID>1568332</AlbumID><Title>PPBS 2005 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></2><3><AlbumID>1266416</AlbumID><Title>2004-03-26 Petra Cliffs</Title><CategoryID>8</CategoryID><Category>Events</Category></3><4><AlbumID>1238599</AlbumID><Title>The Frigid Infliction at Bolton Valley - Course Design</Title><CategoryID>64908</CategoryID><Category>Races</Category></4><5><AlbumID>1243455</AlbumID><Title>2005-05-14 Orienteering Clinic</Title><CategoryID>8</CategoryID><Category>Events</Category></5><6><AlbumID>1243439</AlbumID><Title>2005-11-19 Warren Miller</Title><CategoryID>8</CategoryID><Category>Events</Category></6><7><AlbumID>1243434</AlbumID><Title>2006-01-13 Petra and Dinner</Title><CategoryID>8</CategoryID><Category>Events</Category></7><8><AlbumID>1243440</AlbumID><Title>EMS</Title><CategoryID>0</CategoryID><Category>Other</Category></8><9><AlbumID>1238606</AlbumID><Title>Logos</Title><CategoryID>64909</CategoryID><Category>Media</Category></9><10><AlbumID>1568317</AlbumID><Title>The Bitter Pill 2005 - Best Of</Title><CategoryID>64908</CategoryID><Category>Races</Category></10><11><AlbumID>1568321</AlbumID><Title>The Bitter Pill 2005 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></11><12><AlbumID>1568340</AlbumID><Title>The Bitter Pill 2004 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></12><13><AlbumID>1568342</AlbumID><Title>PPBS 2004 - All</Title><CategoryID>64908</CategoryID><Category>Races</Category></13></rsp>
(As a side note, is there a way to stop the forum from interpreting < as the beginning of an html tag? Makes pasting xml code kinda ugly without doing a search-replace in an editor first...)
0