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

DEMO_Getdata_local.ipynb - getData: JSONDecodeError: Expecting value: line 1 column 1 (char 0) #46

Open
JTStephens18 opened this issue Sep 2, 2024 · 1 comment

Comments

@JTStephens18
Copy link

When running the DEMO_Getdata_local.ipynb notebook, the getData function does not return a value and produces the following error:

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I have tried calling this function exactly as is in the notebook as well as using my auth_token and the isotropic1024coarse dataset. I get the same result.

Here is the full output:


getData is processing...

JSONDecodeError Traceback (most recent call last)
in <cell line: 31>()
29 """
30 # process interpolation/differentiation of points.
---> 31 result = getData(dataset, variable, time, temporal_method, spatial_method, spatial_operator, points)
32
33 """

3 frames
/usr/local/lib/python3.10/dist-packages/givernylocal/turbulence_toolkit.py in getData(cube, var_original, timepoint_original, temporal_method_original, spatial_method_original, spatial_operator_original, points, option, trace_memory, verbose)
108
109 # convert the response string to a numpy array.
--> 110 result = np.array(json.loads(response.text), dtype = np.float32)
111
112 # get the output header.

/usr/lib/python3.10/json/init.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
348 cls = JSONDecoder

/usr/lib/python3.10/json/decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):

/usr/lib/python3.10/json/decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@alanZee
Copy link

alanZee commented Nov 8, 2024

When running the DEMO_Getdata_local.ipynb notebook,...
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants