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

orfu new station causes an error on auto screen #59

Closed
dwr-psandhu opened this issue Dec 8, 2024 · 2 comments
Closed

orfu new station causes an error on auto screen #59

dwr-psandhu opened this issue Dec 8, 2024 · 2 comments
Assignees

Comments

@dwr-psandhu
Copy link
Contributor

auto_screen pipeline is failing

y:\jenkins_repo\continuous>call d:\ProgramData\miniconda3\condabin\conda activate dms_datastore   & auto_screen --config screen_config_v20230126 --fpath formatted --dest screened --params elev 
     agency_id  ...                                              notes
id              ...                                                   
anh2    B95020  ...  USBR and DWR have equipment within a 30x30 bui...
ben     B94175  ...                                                NaN
ccs        CCS  ...                          Old Vallejo Pumping Plant
ccy   11452500  ...                                                NaN
cis     B95290  ...                                                NaN
...        ...  ...                                                ...
wwc        wwc  ...  Special Flow Study for 2021 False River Barrie...
rrcn      rrcn  ...  Special Flow Study for 2021 False River Barrie...
rrcs      rrcs  ...  Special Flow Study for 2021 False River Barrie...
x2          x2  ...                                      Calculated X2
ndoi      ndoi  ...                                                NaN

[287 rows x 14 columns]
Traceback (most recent call last):
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Scripts\auto_screen-script.py", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\dms_datastore\auto_screen.py", line 566, in main
    auto_screen(
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\dms_datastore\auto_screen.py", line 209, in auto_screen
    inventory = repo_data_inventory(fpath)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\dms_datastore\inventory.py", line 162, in repo_data_inventory
    metadf.loc[:,'agency'] = station_db.loc[metadf.station_id,'agency'].to_numpy()
                             ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1184, in __getitem__
    return self._getitem_tuple(key)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1368, in _getitem_tuple
    return self._getitem_lowerdim(tup)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1089, in _getitem_lowerdim
    return getattr(section, self.name)[new_key]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1191, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1420, in _getitem_axis
    return self._getitem_iterable(key, axis=axis)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1360, in _getitem_iterable
    keyarr, indexer = self._get_listlike_indexer(key, axis)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexing.py", line 1558, in _get_listlike_indexer
    keyarr, indexer = ax._get_indexer_strict(key, axis_name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexes\base.py", line 6200, in _get_indexer_strict
    self._raise_if_missing(keyarr, indexer, axis_name)
  File "d:\ProgramData\miniconda3\envs\dms_datastore\Lib\site-packages\pandas\core\indexes\base.py", line 6252, in _raise_if_missing
    raise KeyError(f"{not_found} not in index")
KeyError: "['orfu'] not in index"
@dwr-psandhu
Copy link
Contributor Author

@water-e When you changed "orfu" to "oaau" did you manually change anything in the repo ? It looks like jenkins update on auto screen is failing because the name in the metadata of the existing files are orfu and it can no longer find it ?
station dbase has ooau in it however the metadata from the existing filenames points to orfu? Is there a utility to do it or is it done manually?

@water-e
Copy link
Contributor

water-e commented Dec 10, 2024

Yes, that is what was happening. I thought we could leave the older orfu files in place, but apparently not. The screener is going to complain about any station id that is not registered. I am not sure it is a bug to be forced into this type of housekeeping. The other possible result would have been a lot of ncro_orfu* detritus. Anyhow, I just deleted those in jenkins, because the oaad equivalents are already in place. There should be a similar housekeeping issue with screened, but oddly I don't see any orfu there. This is easy until we have user flags. Then we will have to figure out how to do name changes more automatically and carefully.

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

3 participants