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

Bug Report: TypeError: Object of type datetime is not JSON serializable #355

Open
thepsalmist opened this issue Dec 4, 2024 · 1 comment · May be fixed by #361
Open

Bug Report: TypeError: Object of type datetime is not JSON serializable #355

thepsalmist opened this issue Dec 4, 2024 · 1 comment · May be fixed by #361
Labels
bug Something isn't working

Comments

@thepsalmist
Copy link
Contributor

An error occurs when attempting to serialize a datetime object to JSON when passing in rabbitmq_headers as extra_metadata to the StoryArchiveWriter

Sample rabbitmq_headers

rabbitmq_headers: {

x-death: [
{"count":"110L","exchange":"''","original-expiration":"'120000'","queue":"'fetcher-fast'","reason":"'expired'","routing-keys":"['fetcher-fast']","time":"datetime.datetime(2024, 12, 2, 19, 45, 19)"},
{"count":"1L","exchange":"''","original-expiration":"'3600000'","queue":"'fetcher-delay'","reason":"'expired'","routing-keys":"['fetcher-delay']","time":"datetime.datetime(2024, 12, 2, 19, 43, 16)"}
],
x-first-death-exchange: "",
x-first-death-queue: "fetcher-delay",
x-first-death-reason: "expired",
x-mc-name: "_on_input_message",
x-mc-retries: 2,
x-mc-what: "Retry('skipped due to recent connection failure')",
x-mc-when: "1733164994.9960396",
x-mc-where: "/app/indexer/workers/fetcher/tqfetcher.py:461",
x-mc-who: "fetcher"
}
}
@thepsalmist thepsalmist added the bug Something isn't working label Dec 4, 2024
@philbudne
Copy link
Contributor

philbudne commented Dec 4, 2024 via email

philbudne added a commit to philbudne/story-indexer that referenced this issue Dec 22, 2024
fix mediacloud#355
by only dumping x-mc- headers (as noted in comments)

Add --really-queue and --ignore-domain options
@philbudne philbudne linked a pull request Dec 22, 2024 that will close this issue
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
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants