{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/gaubert/sickle/pulls/1","id":38876788,"html_url":"https://github.com/gaubert/sickle/pull/1","diff_url":"https://github.com/gaubert/sickle/pull/1.diff","patch_url":"https://github.com/gaubert/sickle/pull/1.patch","issue_url":"https://api.github.com/repos/gaubert/sickle/issues/1","number":1,"state":"open","locked":false,"title":"empty resumption token create an error in the client","user":{"login":"gaubert","id":1482,"avatar_url":"https://avatars.githubusercontent.com/u/1482?v=3","gravatar_id":"","url":"https://api.github.com/users/gaubert","html_url":"https://github.com/gaubert","followers_url":"https://api.github.com/users/gaubert/followers","following_url":"https://api.github.com/users/gaubert/following{/other_user}","gists_url":"https://api.github.com/users/gaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/gaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaubert/subscriptions","organizations_url":"https://api.github.com/users/gaubert/orgs","repos_url":"https://api.github.com/users/gaubert/repos","events_url":"https://api.github.com/users/gaubert/events{/privacy}","received_events_url":"https://api.github.com/users/gaubert/received_events","type":"User","site_admin":false},"body":"According to the XSD grammar it is possible to have an empty resumptionToken. This creates an exception in the client:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"oai-sickle.py\", line 15, in <module>\r\n    for rec in records:\r\n  File \"xxxxxxx\\python-2.7.6\\lib\\site-packages\\sickle\\iterator.py\", line 148, in next\r\n    self._next_response()\r\n  File \"xxxxxxx\\python-2.7.6\\lib\\site-packages\\sickle\\iterator.py\", line 135, in _next_response\r\n    super(OAIItemIterator, self)._next_response()\r\n  File \"xxxxxxx\\python-2.7.6\\lib\\site-packages\\sickle\\iterator.py\", line 89, in _next_response\r\n    oaiexceptions, code[0].upper() + code[1:])(description)\r\nBadArgument: Bad argument: metadataPrefix\r\n\r\nBad argument: metadataPrefix\r\n```\r\n\r\n\r\n```\r\n<OAI-PMH xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.openarchives.org/OAI/2.0/\" xsi:schemaLocation=\"http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd\">\r\n<SCRIPT/>\r\n<responseDate>2015-06-30T12:55:54Z</responseDate>\r\n<request verb=\"ListIdentifiers\" metadataPrefix=\"iso19139\" from=\"2015-06-01T23:59:59Z\" until=\"2015-06-28T23:59:59Z\">xxxxxxxxxxxx</request>\r\n<ListIdentifiers>\r\n<header>\r\n<identifier>xxxxxxxx</identifier>\r\n<datestamp>2014-10-24T00:00:00Z</datestamp>\r\n<setSpec>blah</setSpec>\r\n</header>\r\n<resumptionToken cursor=\"0\" completeListSize=\"46\"/>\r\n</ListIdentifiers>\r\n\r\nI have implemented a quick fix by just testing the existence of the token attribute in the resumption token itself. You might want to do it differently. \r\n\r\n```","created_at":"2015-06-30T13:23:05Z","updated_at":"2015-06-30T13:23:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gaubert/sickle/pulls/1/commits","review_comments_url":"https://api.github.com/repos/gaubert/sickle/pulls/1/comments","review_comment_url":"https://api.github.com/repos/gaubert/sickle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gaubert/sickle/issues/1/comments","statuses_url":"https://api.github.com/repos/gaubert/sickle/statuses/5c6c4d2afad9e7a4b1b19494e56a411b5f474e2c","head":{"label":"gaubert:gaubert-patch-1","ref":"gaubert-patch-1","sha":"5c6c4d2afad9e7a4b1b19494e56a411b5f474e2c","user":{"login":"gaubert","id":1482,"avatar_url":"https://avatars.githubusercontent.com/u/1482?v=3","gravatar_id":"","url":"https://api.github.com/users/gaubert","html_url":"https://github.com/gaubert","followers_url":"https://api.github.com/users/gaubert/followers","following_url":"https://api.github.com/users/gaubert/following{/other_user}","gists_url":"https://api.github.com/users/gaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/gaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaubert/subscriptions","organizations_url":"https://api.github.com/users/gaubert/orgs","repos_url":"https://api.github.com/users/gaubert/repos","events_url":"https://api.github.com/users/gaubert/events{/privacy}","received_events_url":"https://api.github.com/users/gaubert/received_events","type":"User","site_admin":false},"repo":{"id":38307263,"name":"sickle","full_name":"gaubert/sickle","owner":{"login":"gaubert","id":1482,"avatar_url":"https://avatars.githubusercontent.com/u/1482?v=3","gravatar_id":"","url":"https://api.github.com/users/gaubert","html_url":"https://github.com/gaubert","followers_url":"https://api.github.com/users/gaubert/followers","following_url":"https://api.github.com/users/gaubert/following{/other_user}","gists_url":"https://api.github.com/users/gaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/gaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaubert/subscriptions","organizations_url":"https://api.github.com/users/gaubert/orgs","repos_url":"https://api.github.com/users/gaubert/repos","events_url":"https://api.github.com/users/gaubert/events{/privacy}","received_events_url":"https://api.github.com/users/gaubert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaubert/sickle","description":"Sickle: An OAI Client Library for Python","fork":true,"url":"https://api.github.com/repos/gaubert/sickle","forks_url":"https://api.github.com/repos/gaubert/sickle/forks","keys_url":"https://api.github.com/repos/gaubert/sickle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaubert/sickle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaubert/sickle/teams","hooks_url":"https://api.github.com/repos/gaubert/sickle/hooks","issue_events_url":"https://api.github.com/repos/gaubert/sickle/issues/events{/number}","events_url":"https://api.github.com/repos/gaubert/sickle/events","assignees_url":"https://api.github.com/repos/gaubert/sickle/assignees{/user}","branches_url":"https://api.github.com/repos/gaubert/sickle/branches{/branch}","tags_url":"https://api.github.com/repos/gaubert/sickle/tags","blobs_url":"https://api.github.com/repos/gaubert/sickle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaubert/sickle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaubert/sickle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaubert/sickle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaubert/sickle/statuses/{sha}","languages_url":"https://api.github.com/repos/gaubert/sickle/languages","stargazers_url":"https://api.github.com/repos/gaubert/sickle/stargazers","contributors_url":"https://api.github.com/repos/gaubert/sickle/contributors","subscribers_url":"https://api.github.com/repos/gaubert/sickle/subscribers","subscription_url":"https://api.github.com/repos/gaubert/sickle/subscription","commits_url":"https://api.github.com/repos/gaubert/sickle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaubert/sickle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaubert/sickle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaubert/sickle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaubert/sickle/contents/{+path}","compare_url":"https://api.github.com/repos/gaubert/sickle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaubert/sickle/merges","archive_url":"https://api.github.com/repos/gaubert/sickle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaubert/sickle/downloads","issues_url":"https://api.github.com/repos/gaubert/sickle/issues{/number}","pulls_url":"https://api.github.com/repos/gaubert/sickle/pulls{/number}","milestones_url":"https://api.github.com/repos/gaubert/sickle/milestones{/number}","notifications_url":"https://api.github.com/repos/gaubert/sickle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaubert/sickle/labels{/name}","releases_url":"https://api.github.com/repos/gaubert/sickle/releases{/id}","created_at":"2015-06-30T12:12:19Z","updated_at":"2015-06-30T12:12:20Z","pushed_at":"2015-06-30T13:22:35Z","git_url":"git://github.com/gaubert/sickle.git","ssh_url":"git@github.com:gaubert/sickle.git","clone_url":"https://github.com/gaubert/sickle.git","svn_url":"https://github.com/gaubert/sickle","homepage":null,"size":494,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gaubert:master","ref":"master","sha":"142b16243b30a2f893607f3f97618185f8197b6c","user":{"login":"gaubert","id":1482,"avatar_url":"https://avatars.githubusercontent.com/u/1482?v=3","gravatar_id":"","url":"https://api.github.com/users/gaubert","html_url":"https://github.com/gaubert","followers_url":"https://api.github.com/users/gaubert/followers","following_url":"https://api.github.com/users/gaubert/following{/other_user}","gists_url":"https://api.github.com/users/gaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/gaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaubert/subscriptions","organizations_url":"https://api.github.com/users/gaubert/orgs","repos_url":"https://api.github.com/users/gaubert/repos","events_url":"https://api.github.com/users/gaubert/events{/privacy}","received_events_url":"https://api.github.com/users/gaubert/received_events","type":"User","site_admin":false},"repo":{"id":38307263,"name":"sickle","full_name":"gaubert/sickle","owner":{"login":"gaubert","id":1482,"avatar_url":"https://avatars.githubusercontent.com/u/1482?v=3","gravatar_id":"","url":"https://api.github.com/users/gaubert","html_url":"https://github.com/gaubert","followers_url":"https://api.github.com/users/gaubert/followers","following_url":"https://api.github.com/users/gaubert/following{/other_user}","gists_url":"https://api.github.com/users/gaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/gaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaubert/subscriptions","organizations_url":"https://api.github.com/users/gaubert/orgs","repos_url":"https://api.github.com/users/gaubert/repos","events_url":"https://api.github.com/users/gaubert/events{/privacy}","received_events_url":"https://api.github.com/users/gaubert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaubert/sickle","description":"Sickle: An OAI Client Library for Python","fork":true,"url":"https://api.github.com/repos/gaubert/sickle","forks_url":"https://api.github.com/repos/gaubert/sickle/forks","keys_url":"https://api.github.com/repos/gaubert/sickle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaubert/sickle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaubert/sickle/teams","hooks_url":"https://api.github.com/repos/gaubert/sickle/hooks","issue_events_url":"https://api.github.com/repos/gaubert/sickle/issues/events{/number}","events_url":"https://api.github.com/repos/gaubert/sickle/events","assignees_url":"https://api.github.com/repos/gaubert/sickle/assignees{/user}","branches_url":"https://api.github.com/repos/gaubert/sickle/branches{/branch}","tags_url":"https://api.github.com/repos/gaubert/sickle/tags","blobs_url":"https://api.github.com/repos/gaubert/sickle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaubert/sickle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaubert/sickle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaubert/sickle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaubert/sickle/statuses/{sha}","languages_url":"https://api.github.com/repos/gaubert/sickle/languages","stargazers_url":"https://api.github.com/repos/gaubert/sickle/stargazers","contributors_url":"https://api.github.com/repos/gaubert/sickle/contributors","subscribers_url":"https://api.github.com/repos/gaubert/sickle/subscribers","subscription_url":"https://api.github.com/repos/gaubert/sickle/subscription","commits_url":"https://api.github.com/repos/gaubert/sickle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaubert/sickle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaubert/sickle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaubert/sickle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaubert/sickle/contents/{+path}","compare_url":"https://api.github.com/repos/gaubert/sickle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaubert/sickle/merges","archive_url":"https://api.github.com/repos/gaubert/sickle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaubert/sickle/downloads","issues_url":"https://api.github.com/repos/gaubert/sickle/issues{/number}","pulls_url":"https://api.github.com/repos/gaubert/sickle/pulls{/number}","milestones_url":"https://api.github.com/repos/gaubert/sickle/milestones{/number}","notifications_url":"https://api.github.com/repos/gaubert/sickle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaubert/sickle/labels{/name}","releases_url":"https://api.github.com/repos/gaubert/sickle/releases{/id}","created_at":"2015-06-30T12:12:19Z","updated_at":"2015-06-30T12:12:20Z","pushed_at":"2015-06-30T13:22:35Z","git_url":"git://github.com/gaubert/sickle.git","ssh_url":"git@github.com:gaubert/sickle.git","clone_url":"https://github.com/gaubert/sickle.git","svn_url":"https://github.com/gaubert/sickle","homepage":null,"size":494,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gaubert/sickle/pulls/1"},"html":{"href":"https://github.com/gaubert/sickle/pull/1"},"issue":{"href":"https://api.github.com/repos/gaubert/sickle/issues/1"},"comments":{"href":"https://api.github.com/repos/gaubert/sickle/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/gaubert/sickle/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/gaubert/sickle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gaubert/sickle/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/gaubert/sickle/statuses/5c6c4d2afad9e7a4b1b19494e56a411b5f474e2c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}