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

Met returning 404 from collection API endpoint #639

Open
jacobthill opened this issue Jan 23, 2025 · 0 comments
Open

Met returning 404 from collection API endpoint #639

jacobthill opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jacobthill
Copy link
Contributor

jacobthill commented Jan 23, 2025

The Met API we currently use is returning a 404 leading to the following error:

Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line 465, in _execute_task
    result = _execute_callable(context=context, **execute_callable_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line 432, in _execute_callable
    return execute_callable(context=context, **execute_callable_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/baseoperator.py", line 401, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/python.py", line 235, in execute
    return_value = self.execute_callable()
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/python.py", line 252, in execute_callable
    return self.python_callable(*self.op_args, **self.op_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/airflow/dlme_airflow/harvester/source_harvester.py", line 24, in data_source_harvester
    df_and_csv = dataframe_to_file(collection, last_harvest_start_date)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/airflow/dlme_airflow/utils/dataframe.py", line 40, in dataframe_to_file
    source_df = collection.catalog.read()
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/airflow/dlme_airflow/drivers/json.py", line 165, in read
    self._load_metadata()
  File "/home/airflow/.local/lib/python3.12/site-packages/intake/source/base.py", line 84, in _load_metadata
    self._schema = self._get_schema()
                   ^^^^^^^^^^^^^^^^^^
  File "/opt/airflow/dlme_airflow/drivers/json.py", line 145, in _get_schema
    self._open_collection()
  File "/opt/airflow/dlme_airflow/drivers/json.py", line 49, in _open_collection
    ).urls()
      ^^^^^^
  File "/opt/airflow/dlme_airflow/utils/partition_url_builder.py", line 38, in urls
    partition_urls = self._calculate_partitions()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/airflow/dlme_airflow/utils/partition_url_builder.py", line 63, in _calculate_partitions
    record_count = expression.find(self.provider_data)[0].value
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
@jacobthill jacobthill added the bug Something isn't working label Jan 23, 2025
@aaron-collier aaron-collier changed the title Getting this error with Met Met returning 404 from collection API endpoint Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant