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

cbook.get_sample_data broken #478

Closed
jdh2358 opened this issue Sep 18, 2011 · 3 comments · Fixed by #479
Closed

cbook.get_sample_data broken #478

jdh2358 opened this issue Sep 18, 2011 · 3 comments · Fixed by #479
Assignees

Comments

@jdh2358
Copy link
Collaborator

@jdh2358 jdh2358 commented Sep 18, 2011

Christoph Golke first reported that cbook.get_sample_data from github is broken:

I have trouble receiving the sample_data from github via cbook.py. There
are frequent HTTP 304 (Not Modified) and 500 (Internal Server Error)
exceptions and redirection to
https://raw.github.com/matplotlib/sample_data/master.

I can confirm this on linux::

msierig@pinchiepie:> python -c "import matplotlib.cbook as cbook; datafile = cbook.get_sample_data('ct.raw', asfileobj=False); print datafile"
Traceback (most recent call last):
File "", line 1, in
File "/home/msierig/dev/lib/python2.7/site-packages/matplotlib/cbook.py", line 688, in get_sample_data
return myserver.get_sample_data(fname, asfileobj=asfileobj)
File "/home/msierig/dev/lib/python2.7/site-packages/matplotlib/cbook.py", line 626, in get_sample_data
raise KeyError(msg)
KeyError: 'file ct.raw not in cache; received HTTP Error 304: Not Modified when trying to retrieve'
msierig@pinchiepie:
>

@ghost ghost assigned jkseppan Sep 18, 2011
@jkseppan

This comment has been minimized.

Copy link
Member

@jkseppan jkseppan commented Sep 18, 2011

It seems that github redirection has broken the cache: we look for https://github.com/matplotlib/sample_data/raw/master/ct.raw but the cache key is https://raw.github.com/matplotlib/sample_data/master/ct.raw

jkseppan added a commit to jkseppan/matplotlib that referenced this issue Sep 18, 2011
This is a quick patch to fix matplotlib#478, not a future-proof solution.
@jkseppan

This comment has been minimized.

Copy link
Member

@jkseppan jkseppan commented Sep 18, 2011

Quick fix for the URL in #479, no time for a better solution right now but we should fix this properly so that future redirections by github don't keep breaking our code.

@jdh2358

This comment has been minimized.

Copy link
Collaborator Author

@jdh2358 jdh2358 commented Sep 23, 2011

Eric merged this into master, so I am closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.