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

fix parse_datetime_ranges #933

Merged
merged 1 commit into from
Jan 27, 2025
Merged

fix parse_datetime_ranges #933

merged 1 commit into from
Jan 27, 2025

Conversation

aspeddro
Copy link
Contributor

Depois de #931 apareceu alguns erros devido a alterações nas respostas do backend.

Log de erro de br_ibge_ipca15.mes_categoria_municipio

Task 'check_for_updates': Exception encountered during task execution!
Traceback (most recent call last):
  File "/opt/venv/lib/python3.10/site-packages/prefect/engine/task_runner.py", line 876, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/opt/venv/lib/python3.10/site-packages/prefect/utilities/executors.py", line 454, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "/home/runner/work/pipelines/pipelines/pipelines/utils/crawler_ibge_inflacao/tasks.py", line 131, in check_for_updates
  File "/opt/venv/lib/python3.10/site-packages/pipelines/utils/metadata/utils.py", line 648, in get_api_most_recent_date
    coverages = get_coverage_value(
  File "/opt/venv/lib/python3.10/site-packages/pipelines/utils/metadata/utils.py", line 486, in get_coverage_value
    date_objects = parse_datetime_ranges(datetime_result, date_format)
  File "/opt/venv/lib/python3.10/site-packages/pipelines/utils/metadata/utils.py", line 554, in parse_datetime_ranges
    edges = datetime_result["allCoverage"]["edges"]
KeyError: 'edges'

@aspeddro aspeddro requested a review from a team January 27, 2025 13:45
Copy link

Coverage

Tests Skipped Failures Errors Time
8 7 💤 0 ❌ 0 🔥 12.764s ⏱️

@aspeddro aspeddro merged commit ad1656b into main Jan 27, 2025
7 checks passed
@aspeddro aspeddro deleted the fix-parse_datetime_ranges branch January 27, 2025 14:26
@aspeddro aspeddro mentioned this pull request Jan 27, 2025
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

Successfully merging this pull request may close these issues.

2 participants