Skip to content

Instantly share code, notes, and snippets.

@jhkennedy
Last active November 9, 2022 07:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhkennedy/e9e7ec353b2a05419e50413368ff0505 to your computer and use it in GitHub Desktop.
Save jhkennedy/e9e7ec353b2a05419e50413368ff0505 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NKakar
Copy link

NKakar commented Mar 23, 2022

Hello, Thank you for the notebook. I get error in the following step, do you have an idea? Thanks
TypeError: Indexing arrays must have integer dtypes - step - correct_troposphere

grab metadata from ref_file: /Test_Data/hawaii-sbas-agu/timeseries.h5
grab dataset structure from ref_file: /Test_Data/hawaii-sbas-agu/timeseries.h5
create HDF5 file: /Test_Data/hawaii-sbas-agu/timeseries_ERA5.h5 with w mode
create dataset : bperp of float32 in size of (41,) with compression = None
create dataset : date of |S8 in size of (41,) with compression = None
create dataset : timeseries of float32 in size of (41, 775, 3213) with compression = None
close HDF5 file: /Test_Data/hawaii-sbas-agu/timeseries_ERA5.h5

@jhkennedy
Copy link
Author

Hi @NKakar! That's an error due to a change in the h5py dependency of MintPy as documented here:
insarlab/MintPy#741

It should be fixed in the next release, but you can pin h5py<3 to resolve it for now. Hope that helps!

@srinty
Copy link

srinty commented Sep 9, 2022

Hi, Thank you so much for this notebook. I am having an error for, stack.loc[(stack_start <= stack.startTime) & (stack.startTime <= stack_end)]
Can you please tell how to resolve this issue?

Error:
[SpyderKernelApp] ERROR | Error in message handler
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 461, in dispatch_queue
await self.process_one()
File "/opt/anaconda3/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 450, in process_one
await dispatch(*args)
TypeError: object NoneType can't be used in 'await' expression
Traceback (most recent call last):

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arrays/datetimelike.py", line 536, in _validate_comparison_value
self._check_compatible_with(other)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arrays/datetimes.py", line 508, in _check_compatible_with
self._assert_tzawareness_compat(other)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arrays/datetimes.py", line 715, in _assert_tzawareness_compat
raise TypeError(

TypeError: Cannot compare tz-naive and tz-aware datetime-like objects

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arrays/datetimelike.py", line 1008, in _cmp_method
other = self._validate_comparison_value(other)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arrays/datetimelike.py", line 539, in _validate_comparison_value
raise InvalidComparison(other) from err

InvalidComparison: 2018-01-01 00:00:00

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/var/folders/5q/5tntqnbn0yzc5gh280ncl2jm0000gn/T/ipykernel_975/1019817884.py", line 1, in
stack = stack.loc[(stack_start <= stack.startTime) & (stack.startTime <= stack_end)]

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/ops/common.py", line 70, in new_method
return method(self, other)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arraylike.py", line 60, in ge
return self._cmp_method(other, operator.ge)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/series.py", line 5620, in _cmp_method
res_values = ops.comparison_op(lvalues, rvalues, op)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/ops/array_ops.py", line 269, in comparison_op
res_values = op(lvalues, rvalues)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/ops/common.py", line 70, in new_method
return method(self, other)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arraylike.py", line 60, in ge
return self._cmp_method(other, operator.ge)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/arrays/datetimelike.py", line 1010, in _cmp_method
return invalid_comparison(self, other, op)

File "/opt/anaconda3/lib/python3.8/site-packages/pandas/core/ops/invalid.py", line 34, in invalid_comparison
raise TypeError(f"Invalid comparison between dtype={left.dtype} and {typ}")

TypeError: Invalid comparison between dtype=datetime64[ns, tzutc()] and datetime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment