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

KeyError: 'Author' from enhance/native_conda branch #53

Closed
FariborzDaneshvar-NOAA opened this issue Jun 28, 2024 · 4 comments
Closed

KeyError: 'Author' from enhance/native_conda branch #53

FariborzDaneshvar-NOAA opened this issue Jun 28, 2024 · 4 comments

Comments

@FariborzDaneshvar-NOAA
Copy link
Collaborator

The workflow failed after mesh with this error message:

Download necessary data...
Traceback (most recent call last): 
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/bin/download_data", line 5, in <module>  
    from stormworkflow.prep.download_data import cli                                                             
  File "/nhc/Fariborz.Daneshvar/sandbox/workflow_native/ondemand-storm-workflow/stormworkflow/prep/download_data.py", line 8, in <module>  
    from pyschism.mesh import Hgrid
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/__init__.py", line 4, in <module>                                                                                               
    from pyschism.stations import Stations                                                                       
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/stations.py", line 12, in <module>                                                                                              
    from pyschism.enums import (                                                                                 
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/enums.py", line 707, in <module> 
    class Sflux1Types(Enum):    
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/enums.py", line 709, in Sflux1Types                                
    from pyschism.forcing import nws                                                                             
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/forcing/__init__.py", line 3, in <module>                                                                                     
    from pyschism.forcing.nws.nws2.gfs import GlobalForecastSystem                                               
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/forcing/nws/__init__.py", line 1, in <module>                                                                                 
    from pyschism.forcing.nws.nws2 import NWS2                                                                   
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/forcing/nws/nws2/__init__.py", line 1, in <module>                                                                            
    from pyschism.forcing.nws.nws2.nws2 import NWS2                                                              
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/forcing/nws/nws2/nws2.py", line 9, in <module>                                                                                
    from pyschism.forcing.nws.nws2.sflux import SfluxDataset                                                     
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/pyschism/forcing/nws/nws2/sflux.py", line 9, in <module>                                                                               
    import cf                                                                                                    
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/cf/__init__.py", line 344, in <module>                                                                                                 
    from .regrid import RegridOperator                                                                           
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/cf/regrid/__init__.py", line 1, in <module>                                                                                            
    from .regrid import regrid                                                                                   
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/cf/regrid/regrid.py", line 18, in <module>                                                                                             
    import esmpy                                                                                                 
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/esmpy/__init__.py", line 106, in <module>                                                                                              
    __author__ = msg["Author"]                                                                                   
  File "/nhc/Fariborz.Daneshvar/miniconda3/envs/stormworkflow/lib/python3.10/site-packages/importlib_metadata/_adapters.py", line 54, in __getitem__                                                                              
    raise KeyError(item)                                                                                       
KeyError: 'Author'                                                                                             
None
@FariborzDaneshvar-NOAA
Copy link
Collaborator Author

@SorooshMani-NOAA suggested checking version of packages.

esmpy                     8.4.2              pyhc1e730c_4    conda-forge 

conda list | grep cf

cf-python                 3.16.1          py310hc57ae4c_0    conda-forge                                       
cfdm                      1.11.1.0        py310hff52083_0    conda-forge                                       
cffi                      1.16.0          py310h2fee648_0    conda-forge                                       
cfgrib                    0.9.13.0           pyhd8ed1ab_0    conda-forge                                       
cfitsio                   4.2.0                hd9d235c_0    conda-forge                                       
cftime                    1.6.4           py310h261611a_0    conda-forge                                       
cfunits                   3.3.7              pyhd8ed1ab_0    conda-forge

The only difference with Soroosh's environment was cfgrib 0.9.13.0 (instead of 0.9.12.0)

@FariborzDaneshvar-NOAA
Copy link
Collaborator Author

I changed cfgrib version (conda install "cfgrib=0.9.12.0") and re-ran the workflow, but it failed again with the same error!

@FariborzDaneshvar-NOAA
Copy link
Collaborator Author

For the record, similar issue: ESMValGroup/ESMValTool#3208

@FariborzDaneshvar-NOAA
Copy link
Collaborator Author

@thanks to @SorooshMani-NOAA for looking into this. I updated importlib_metadata (mamba install -cconda-forge "importlib_metadata<8"), and re-ran it. Problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant