Skip to content
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

AttributeError with cdscan #397

Closed
pochedls opened this issue Jul 7, 2020 · 4 comments · Fixed by #399
Closed

AttributeError with cdscan #397

pochedls opened this issue Jul 7, 2020 · 4 comments · Fixed by #399
Assignees
Labels
bug py3 Python 3.x specific bug
Milestone

Comments

@pochedls
Copy link

pochedls commented Jul 7, 2020

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'

@downiec downiec added the bug label Jul 7, 2020
@jasonb5 jasonb5 added the py3 Python 3.x specific bug label Jul 8, 2020
@jasonb5 jasonb5 added this to the 3.1.6 milestone Jul 8, 2020
@jasonb5
Copy link
Contributor

jasonb5 commented Jul 8, 2020

@forsyth2 Looks like the cdscan script isn't 100% compatible with python 3.

@pochedls
Copy link
Author

@forsyth2 & @jasonb5 - this is so helpful - thank you! Will this be included in the next CDAT release?

@pochedls
Copy link
Author

Note also that you may be able to close #239 and #256.

@jasonb5 jasonb5 modified the milestones: 3.1.6, 3.1.5 Jul 23, 2020
@jasonb5
Copy link
Contributor

jasonb5 commented Jul 23, 2020

@pochedls No problem. This will be in CDAT 8.2.1. Thanks for the links!

@jasonb5 jasonb5 modified the milestones: 3.1.5, 8.2.1 Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug py3 Python 3.x specific bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants