numberscope / backscope

Numberscope's back end: responsible for getting sequences and other data from the On-Line Encyclopedia of Integer Sequences, pre-processing it (factoring etc), and storing it.
MIT License
1 stars 9 forks source link

A005132 is returning a 500 error #150

Closed katestange closed 2 months ago

katestange commented 2 months ago

get_oeis_name_and_values/A005132

is currently returning a 500 on the production server

gwhitney commented 2 months ago

It is happening because of the unicode accent character in the name of the Recamán Sequence, but it doesn't happen when I run the server on my machine, so I am not yet clear how to fix it. Will keep investigating, but if anyone has any ideas please let me know.

gwhitney commented 2 months ago

OK, the exception occurs in views.py, line 443:

            seq.name = search_response['results'][0]['name']

The right hand side is a string with non-ascii unicode characters in it, and the left side is a field of the object-relational model for the database entry for A005132. So my guess is that somehow on the production machine, the database is set up to only take ASCII strings, whereas we most decidedly are not limited in such a way, and that the database on my machine is OK with unicode strings.

I will investigate that possiblity in more depth tomorrow.