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

error on user page: error in processing template: ValueError: Invalid seed #8882

Closed
RayBB opened this issue Mar 7, 2024 · 1 comment · Fixed by #8886
Closed

error on user page: error in processing template: ValueError: Invalid seed #8882

RayBB opened this issue Mar 7, 2024 · 1 comment · Fixed by #8886
Labels
Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed]

Comments

@RayBB
Copy link
Collaborator

RayBB commented Mar 7, 2024

Problem

/openlibrary/openlibrary/templates/lists/snippet.html: error in processing template: ValueError: Invalid seed: Thing(site=<infogami.infobase.client.Site object at 0x7f3053b88050>, key=/works/OL5159916W, data={'location': '/works/OL276798W', 'key': '/works/OL5159916W', 'type': Thing(site=<infogami.infobase.client.Site object at 0x7f3053b88050>, key=/type/redirect, data=None, revision=None), 'latest_revision': 9, 'revision': 9, 'created': datetime.datetime(2009, 12, 10, 8, 51, 6, 587414), 'last_modified': datetime.datetime(2021, 4, 14, 13, 29, 27, 506)}, revision=None) (falling back to default template)

Evidence / Screenshot

image

Relevant URL

https://openlibrary.org/people/clh7cb

Reproducing the bug

  1. Go to the page
  • Expected behavior: no error
  • Actual behavior: there is an error

Context

  • Browser (Chrome, Safari, Firefox, etc): FF
  • OS (Windows, Mac, etc): Mac
  • Logged in (Y/N): Y
  • Environment (prod, dev, local): prod

⚠️ Experienced contributors only

Proposal & constraints

Related files

Stakeholders

@RayBB RayBB added Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Mar 7, 2024
@cdrini
Copy link
Collaborator

cdrini commented Mar 7, 2024

@scottbarnes and I did a preliminary analysis ; this seems to be a sporadic error.

This is the underlying error:
image

Our current hypothesis is that this only errors when a cache miss happens, and the user's list contains a redirect.

It seems like under these conditions, the seed is returned as a client.Thing instead of the openlibrary subclass of client.Thing, which is what is checked for on line 403 in the image above.

scottbarnes added a commit to scottbarnes/openlibrary that referenced this issue Mar 7, 2024
When there is a cache miss, `Seed.from_db()` is called with a
`client.Thing` type, but the logic didn't handle this.

See
internetarchive#8882 (comment).
scottbarnes added a commit to scottbarnes/openlibrary that referenced this issue Mar 7, 2024
When there is a cache miss, `Seed.from_db()` is called with a
`client.Thing` type, but the logic didn't handle this.

See
internetarchive#8882 (comment).
Achorn pushed a commit to Achorn/openlibrary that referenced this issue Mar 14, 2024
When there is a cache miss, `Seed.from_db()` is called with a
`client.Thing` type, but the logic didn't handle this.

See
internetarchive#8882 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants