TypeError: unhashable type: 'list' #542
-
Question criteria
Describe your questionI installed xcat and started testing the examples but noticed an error unhashable type. ds = xc.open_dataset(
filepath,
add_bounds=True,
decode_times=True,
center_times=True
)
Any hint? Are there are any possible answers you came across?No response Minimal Complete Verifiable Example (MVCE)No response Relevant log outputNo response EnvironmentNo response Anything else we need to know?No response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
@fipoucat Which version of The release candidate discussion #517 mentions You may want to remove |
Beta Was this translation helpful? Give feedback.
-
Thank you all, well noted.
…On Thu, Sep 14, 2023 at 4:36 PM Tom Vo ***@***.***> wrote:
Thanks for the answer @jypeter <https://github.com/jypeter>, you are
correct here. v0.5.0 updates add_bounds=True to add_bounds=["X","Y"],
with True being dropped as a valid type.
This brings up a good point that we should have probably added a
deprecation warning and make add_bounds=True equivalent to
add_bounds=["X","Y"]. We'll be more careful about these breaking changes
since the package is starting to mature.
*In the meantime, I'll add a patch so that users who upgrade from an older
version to v0.5.0 don't run into this issue.* Just an FYI
@xCDAT/core-developers
<https://github.com/orgs/xCDAT/teams/core-developers>.
—
Reply to this email directly, view it on GitHub
<#542 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXY6LN6C6NMIYEV6HRZUBDX2MW7HANCNFSM6AAAAAA4XY5WKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yes, I was using v0.5.0
…On Sun, Sep 17, 2023 at 10:47 PM Stephen Po-Chedley < ***@***.***> wrote:
@fipoucat <https://github.com/fipoucat> – were you using v0.5.0 (this
will help us to understand if this is due to new changes or some other
issue)? You can print the version with:
import xcdat as xc
print(xc.__version__)
—
Reply to this email directly, view it on GitHub
<#542 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXY6LOQKPYI5NIN7B3MGR3X254ZRANCNFSM6AAAAAA4XY5WKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am using the example in the user guide
```python
import xcdat as xc
import xesmf
# We import these packages specifically for plotting. It is not required to
use xcdat.
import matplotlib.pyplot as plt
import pandas as pd
filepath = "
https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc
"
```
…On Mon, Sep 18, 2023 at 2:25 PM Stephen Po-Chedley ***@***.***> wrote:
In tracing this down, it *seems* like you were using v0.6.0rc1, because
you get the TypeError on line 159 (for axis in axes)
<https://github.com/xCDAT/xcdat/blob/v0.6.0rc1/xcdat/bounds.py#L159> of
bounds.py, which doesn't seem to match v0.5.0
<https://github.com/xCDAT/xcdat/blob/main/xcdat/bounds.py#L159>. I am a
little confused about what is going on.
Is the dataset you were using publicly available? I'm curious if the issue
you had can be reproduced.
...and...are you still having this issue? Or did changing the add_bounds
argument address your issue (if so, please let us know how)?
—
Reply to this email directly, view it on GitHub
<#542 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXY6LIEBVV5SKARY7VSPR3X3BKVPANCNFSM6AAAAAA4XY5WKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you, that sounds good.
…On Mon, Sep 18, 2023 at 4:07 PM Tom Vo ***@***.***> wrote:
Thanks @pochedls <https://github.com/pochedls>. Yes I'm certain @fipoucat
<https://github.com/fipoucat> is using xcdat=0.6.0rc1. The installed
version can be checked with this comment
<#542 (reply in thread)>
if we want to be sure.
b) remove the add_bounds=True argument in the release candidate version
Or replace add_bounds=True with add_bounds=["X", "Y"] if you want to add
bounds. "T" and "Z" are also valid axes.
c) wait until v0.6 is released (I think Tom is going to address the issue
you raise here).
I merged #546 <#546> to address this
issue. add_bounds=True and add_bounds=False will be deprecated in v0.7.0.
—
Reply to this email directly, view it on GitHub
<#542 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXY6LKZ6R2PKJFHAKDKKOLX3BWSLANCNFSM6AAAAAA4XY5WKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
@fipoucat – I think you are likely using version
0.6.0rc1
(this is a "release candidate," which means it is being tested; I think it will be released as v0.6.0
soon). I can reproduce your issue with the release candidate version, but not with v0.5
.You can: a) use version 0.5 for now, b) remove the
add_bounds=True
argument in the release candidate version, or c) wait until v0.6 is released (I think Tom is going to address the issue you raise here).