-
Notifications
You must be signed in to change notification settings - Fork 14
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
fsspec
0.9.0 doesn't read entire JSON file when using http protocol
#128
Comments
fsspec
0.9.0 doesn't read entire JSON filefsspec
0.9.0 doesn't read entire JSON file when using http protocol
Not sure if this is related, but I'm having trouble reading JSON files from GitHub URLs. When using ParamTools on my local machine, and trying read a raw json file from a github URL, I get an error:
And when trying to read from a non-raw file github URL:
I have ParamTools 0.18.1 installed:
When running the same notebook on Google Colab, the first approach works, but the second does not. I am not sure what ParamTools version is being installed with |
@jdebacker this is related. You can use this kind of URL: In [1]: import paramtools
In [2]: paramtools.read_json("github://PSLmodels:Tax-Calculator@master/docs/recipes/_static/reformA.json")
Out[2]:
OrderedDict([('policy',
OrderedDict([('II_em', OrderedDict([('2020', 1000)])),
('II_rt5', OrderedDict([('2020', 0.36)])),
('II_rt6', OrderedDict([('2020', 0.39)])),
('II_rt7', OrderedDict([('2020', 0.41)])),
('PT_rt5', OrderedDict([('2020', 0.36)])),
('PT_rt6', OrderedDict([('2020', 0.39)])),
('PT_rt7', OrderedDict([('2020', 0.41)]))]))])
In [3]: Or, you can pin to I'll try to figure out how to resolve the bug with reading HTTP urls this week. |
Note that using the github protocol (i.e. reading the file from the github api) works just fine:
Thanks for the report @chusloj.
Related:
The text was updated successfully, but these errors were encountered: