stcorp / coda

The Common Data Access toolset
http://stcorp.github.io/coda/doc/html/index.html
BSD 3-Clause "New" or "Revised" License
39 stars 17 forks source link

coda_fetch python give an error meassage: cursor_read_bytes() missing 2 required positional arguments: 'offset' and 'count' #88

Closed sahar-github closed 3 years ago

sahar-github commented 3 years ago

I am trying to read an EPS product from IASI sensor using coda. The structure of my file is like below, when I opened the data in MATLAB by coda_fetch: image

Now, I would like to read my data using coda.fetch in python. I can read all the structures very easily with the command product=coda.fetch(ID,'MPHR')

except from the MDR field. If I try to use command ""product=coda.fetch(ID,'MDR')"" to read the MDR data, I get the below error message "TypeError: cursor_read_bytes() missing 2 required positional arguments: 'offset' and 'count'"

Could you please let me know, what is the problem? and how can I solve it? Thank you Sahar

svniemeijer commented 3 years ago

This issue should have been solved with coda 2.22.2. What version are you using?

sahar-github commented 3 years ago

I thought this might be the reason, I just installed coda2.22.2, and tested it, but still I get the same error message

svniemeijer commented 3 years ago

Are you sure you are using the new coda version (do you get the right version if you use print(coda.version()) in python?

Can you let me know which IASI product you are trying to read?

sahar-github commented 3 years ago

oh no, it seems the coda version of my conda env is still 2.22.1. although I installed the new version, it is working yet with the older version. How can i upgrade the coda version in an existing conda env?

svniemeijer commented 3 years ago

We moved coda to conda-forge. So make sure you are using that channel. Updating can be done by providing an explicit version number conda install -c conda-forge coda=2.22.2. You may have to recreate your conda environment if things don't work.

sahar-github commented 3 years ago

aaahha, okii thanks for the prompt guidance. I am checking it right away :) Thank you very much