-
Notifications
You must be signed in to change notification settings - Fork 78
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
NameError: name 'ujson' is not defined #170
Comments
Try installing and importing the ujson package: https://pypi.org/project/ujson/ . I believe it is functionally the same as the normal json encoder just a bit faster |
I think this is a bug in the blog post: it was updated to use |
Yep, originally we just ran with stock builtin JSON, but as reference files got bigger, we decided to switch to ujson. If installing kerchunk doesn't grab this, then we need to add it to the deps. |
Thanks for catching this typo @najiya-12 - I corrected the import to |
Thank you! It worked |
there's still a typo: m_list = []
for js in tqdm(json_list):
with open(js) as f:
m_list.append(fsspec.get_mapper("reference://",
fo=json.load(f), remote_protocol="s3",
remote_options={"anon": True}))
|
Good catch, thanks! |
I listed the files from S3
urls = ['s3://' + f for f in fs.glob("s3://noaa-goes16/ABI-L2-ACMC/2022/116/*/*.nc")]
given around
len(urls)
272 files
and then generated the
jsons
files and created in the./jsons/
directory, however, I run into an issue withgen_json()
functionNameError: name 'ujson' is not defined
. I followed @lsterzinger tutorial in(https://medium.com/pangeo/fake-it-until-you-make-it-reading-goes-netcdf4-data-on-aws-s3-as-zarr-for-rapid-data-access-61e33f8fe685)
The text was updated successfully, but these errors were encountered: