-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sickle throws an exception if resumption token was repeated #25
Comments
This repository returns a resumption token element without a body in the last response. I don't think that this implementation is correct as to my knowledge the last response should not contain a resumption token element at all. You could hack your way around this by monitoring the resumption token for an empty body: sickle = Sickle('https://www.ssoar.info/OAIHandler/request', iterator=OAIResponseIterator)
iterator = sickle.ListRecords(metadataPrefix='oai_genios')
for record_set in iterator:
print(record_set)
if iterator.resumption_token and not iterator.resumption_token.token:
# resumption token with empty body means last response
break
print(iterator.resumption_token) BTW the |
Actually this is a bug in Sickle that has been fixed in #4 for The workaround documented in my previous comment can be used for now |
Thanks for the response, the workaround and the fix! |
Fixed in release 0.6.4 |
I have a problem with harvesting a OAI repository. After the last valid record set is downloaded, the repository (DSpace based) sends the same resumption token. This makes Sickle send another request with no metadata_prefix, which causes an error with the repository. Any idea how to fix this?
The text was updated successfully, but these errors were encountered: