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

source-sim-matrix job failing for some regions #139

Open
2 tasks
porteron opened this issue Jan 27, 2025 · 0 comments
Open
2 tasks

source-sim-matrix job failing for some regions #139

porteron opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@porteron
Copy link
Member

porteron commented Jan 27, 2025

2025-01-27 17:29:29 [warning  ] Source The Indian Express has no articles. Skipping...
2025-01-27 17:29:29 [warning  ] Source The New Indian Express has no articles. Skipping...
2025-01-27 17:29:29 [warning  ] Source The New York Times has no articles. Skipping...
2025-01-27 17:29:29 [warning  ] Source The New Yorker has no articles. Skipping...
2025-01-27 17:29:29 [warning  ] Source The News Minute has no articles. Skipping...
2025-01-27 17:29:29 [warning  ] Source The Quint has no articles. Skipping...
115it [00:00, 1607.96it/s]
Traceback (most recent call last):
  File "/app/source-similarity-matrix.py", line 70, in <module>
    f"Source {sources_df[sources_df.publisher_id == publisher_id].publisher_name.item()} has no articles. Skipping...")
  File "/usr/local/lib/python3.9/site-packages/pandas/core/base.py", line 347, in item
    raise ValueError("can only convert an array of size 1 to a Python scalar")
ValueError: can only convert an array of size 1 to a Python scalar
  • If there is an error do not fail the entire job, wrap in a try/except block and continue processing
  • Add error logging for this failing condition, include the feed name if possible.
@porteron porteron self-assigned this Jan 27, 2025
@porteron porteron added the bug Something isn't working label Jan 27, 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