-
Notifications
You must be signed in to change notification settings - Fork 31
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
python run_sample.py ERROR #68
Comments
Hello, I looked more closely and see where the error is occurring now, in the run_sample_analyses() function. This function is meant as general set of interesting post-calculation analyses to show pyPI example applications. As such, it is not critical to the calculation of potential intensity. In that sense, it’s worth noting that you should still be getting valid outputs in your ds dataset, and raw_sample_output.nc will still have all of the output from the pi.py module. If you plan to use tcpyPI to calculate potential intensity with your own input data, then this error will not be directly relevant for your application. That said, it's useful to get this up and running for general education and understanding of how the package works, so I'll get to work fixing it! The “AttributeError” we are running into is related to a mismatch in the version of pickle used to save out the original mdr.pk1 pickle file, and the version of xarray we are using to load in the file. See a related problem here. I will plan to change the source of the mdr data to a more stable file type and push the change to the package soon. In the meantime, please let me know if you encounter other errors that are outside code problematic calls for the mdr.pk1 (e.g. in this sample analysis) |
Duplicate of #48 |
Thank you so much !
…On Thu, Feb 9, 2023 at 6:20 PM Daniel Gilford ***@***.***> wrote:
Hello,
I looked more closely and see where the error is occurring now, in the
run_sample_analyses() function. This function is meant as general set of
interesting post-calculation analyses to show pyPI example applications. As
such, it is not critical to the calculation of potential intensity. In that
sense, it’s worth noting that you should still be getting valid outputs in
your ds dataset, and raw_sample_output.nc will still have all of the
output from the pi.py module. If you plan to use tcpyPI to calculate
potential intensity with your own input data, then this error will not be
directly relevant for your application.
That said, it's useful to get this up and running for general education
and understanding of how the package works, so I'll get to work fixing it!
The “AttributeError” we are running into is related to a mismatch in the
version of pickle <https://docs.python.org/3/library/pickle.html> used to
save out the original mdr.pk1 <http://data/mdr.pk1> pickle file, and the
version of xarray we are using to load in the file. See a related problem
here
<https://stackoverflow.com/questions/69837913/attributeerror-cant-get-attribute-pandasindexadapter-on-module-xarray-core>
.
I will plan to change the source of the mdr data to a more stable file
type and push the change to the package soon.
In the meantime, please let me know if you encounter other errors that are
outside code problematic calls for the mdr.pk1 <http://data/mdr.pk1>
(e.g. in this sample analysis)
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASXQXQXU3GBC4BBXAZ6WMI3WWUKOLANCNFSM6AAAAAAUWGZ7DI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Performing PI analyses...
Traceback (most recent call last):
File "/home/wamashudu/Videos/Potnetail intensity/tcpyPI-master/run_sample.py", line 148, in
ds2 = run_sample_analyses(ds,_mdrF,CKCD=0.9)
File "/home/wamashudu/Videos/Potnetail intensity/tcpyPI-master/run_sample.py", line 73, in run_sample_analyses
basins = pickle.load( open( _mdrF, "rb" ) )
AttributeError: Can't get attribute 'PandasIndexAdapter' on <module 'xarray.core.indexing' from '/home/wamashudu/anaconda3/lib/python3.9/site-packages/xarray/core/indexing.py'>
The text was updated successfully, but these errors were encountered: