Skip to content

mepo.utilities.exceptions.StateDoesNotExistError: Error! mepo state does not exist #378

Description

@Wesley-J-Davis

Documenting issues installing a repository with mepo:

The code comes from here:

https://github.com/GEOS-ESM/QFED/tree/feature/acollow/aerosolemissionscalingtov2

installing this branch in the following manner

module use -a /discover/swdev/gmao_SIteam/modulefiles-SLES15
module load GEOSenv
mepo clone -b feature/acollow/aerosolemissionscalingtov2 git@github.com:GEOS-ESM/QFED.git

Working under dao_ops with the following modules as per the install instructions mepo fails as follows:

dao_ops@discover36:~/operations/QFED/qfed-3_2_r1> pwd
/home/dao_ops/operations/QFED/qfed-3_2_r1
dao_ops@discover36:~/operations/QFED/qfed-3_2_r1> module purge
dao_ops@discover36:~/operations/QFED/qfed-3_2_r1> module use -a /discover/swdev/gmao_SIteam/modulefiles-SLES15
dao_ops@discover36:~/operations/QFED/qfed-3_2_r1> module load GEOSenv
dao_ops@discover36:~/operations/QFED/qfed-3_2_r1> module list
Currently Loaded Modules:
  1) git/2.49.0     3) other/mepo/2.4.0   5) ImageMagick/7.1.1-15   7) other/gh           9) other/ninja/1.12.0
  2) cmake/3.30.3   4) other/tig/2.5.8    6) git-lfs/3.7.1          8) other/tree/2.1.0  10) GEOSenv
 
dao_ops@discover36:~/operations/QFED/qfed-3_2_r1> mepo clone -b feature/acollow/aerosolemissionscalingtov2 git@github.com:GEOS-ESM/QFED.git
Found partial clone type [blobless] in .mepoconfig
Traceback (most recent call last):
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/command/clone.py", line 78, in read_state
    allcomps = MepoState.read_state()
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/state.py", line 127, in read_state
    raise StateDoesNotExistError("Error! mepo state does not exist")
mepo.utilities.exceptions.StateDoesNotExistError: Error! mepo state does not exist


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/discover/swdev/gmao_SIteam/mepo-pip/2.4.0/bin/mepo", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/__main__.py", line 15, in main
    cmd_module.run(args)
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/command/clone.py", line 41, in run
    allcomps = read_state(args.style, args.registry)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/command/clone.py", line 81, in read_state
    mepo_init(SimpleNamespace(style=arg_style, registry=registry))
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/command/init.py", line 20, in run
    _ = MepoState.initialize(args.registry, style)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/state.py", line 70, in initialize
    input_components = Registry(project_registry).read_file()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/registry.py", line 53, in read_file
    return getattr(self, "read_" + self.__filetype)()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfsm/dswdev/gmao_SIteam/mepo-pip/2.4.0/venvs/mepo/lib/python3.11/site-packages/mepo/registry.py", line 59, in read_yaml
    with open(self.__filename, "r") as fin:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'components.yaml'

Installing with git clone and then cd'ing into the top level dir of the repo and executing mepo clone does in fact work.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions