Skip to content
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

harvesting: bug with remote funder loading #12

Open
krzysztof opened this issue Feb 3, 2016 · 0 comments
Open

harvesting: bug with remote funder loading #12

krzysztof opened this issue Feb 3, 2016 · 0 comments

Comments

@krzysztof
Copy link
Member

On some systems, loading full fundref dataset using requests raises: UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 1551758: ordinal not in range(128)

This unit tests reproduces it:

def test_full_remote_fundref_loader(app):
    """Test the remote loadef for the FundRef dataset."""
    with app.app_context():
        frl = RemoteFundRefLoader()
        json_dataset = list(frl.iter_funders())
        assert len(json_dataset) == 5

But also short snipplet like:

import requests
r = requests.get('http://dx.doi.org/10.13039/fundref_registry')
with open('tmp.xml', 'w') as f:
   f.write(r.text)
@krzysztof krzysztof changed the title Bug with remote funder loading harvesting: bug with remote funder loading Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants