AttributeError with cdscan
pochedls opened this issue · comments
Describe the bug
cdscan failing with AttributeError: 'dict_keys' object has no attribute 'append'
. This is affecting our ability to access a number of CESM files within CFMIP (since we are not able to produce xmls for the files).
It seems this was documented before and there may be a fix (here). If you'd like, I can attempt a pull request with a fix.
To Reproduce
cdscan -x test.xml /p/css03/esgf_publish/CMIP6/CFMIP/NCAR/CESM2/amip-4xCO2/r1i1p1f1/CFmon/clisccp/gn/v20200124/*.nc
Environment (please complete the following information):
- OS: RHEL 7.8
- CDAT8.2 / Python 3.7.3
Related Issues
Error
$ cdscan -x test.xml /p/css03/esgf_publish/CMIP6/CFMIP/NCAR/CESM2/amip-4xCO2/r1i1p1f1/CFmon/clisccp/gn/v20200124/*.nc
Finding common directory ...
Common directory: /p/css03/esgf_publish/CMIP6/CFMIP/NCAR/CESM2/amip-4xCO2/r1i1p1f1/CFmon/clisccp/gn/v20200124/
Scanning files ...
/p/css03/esgf_publish/CMIP6/CFMIP/NCAR/CESM2/amip-4xCO2/r1i1p1f1/CFmon/clisccp/gn/v20200124/clisccp_CFmon_CESM2_amip-4xCO2_r1i1p1f1_gn_197901-201412.nc
Traceback (most recent call last):
File "/export_backup/pochedley1/bin/anaconda3/envs/cdat82/bin/cdscan", line 1842, in
main(sys.argv)
File "/export_backup/pochedley1/bin/anaconda3/envs/cdat82/bin/cdscan", line 1155, in main
varnames.append(axisvar.id)
AttributeError: 'dict_keys' object has no attribute 'append'
@forsyth2 Looks like the cdscan script isn't 100% compatible with python 3.
@pochedls No problem. This will be in CDAT 8.2.1. Thanks for the links!