Unicode errors with Python

Whenever I run my Python application I get this UnicodeError that does not appear on Codespaces or even in local, but only appears in fly.io.

The code can be found here. I have not changed a single line of code to make it fail this way.

Hi!

This might be related - api - python requests - encoding with 'idna' codec failed (UnicodeError: label empty or too long) error - Stack Overflow

Its strange that it would be happening on Fly.io specifically though.

Yep, this is the exact error! I have no idea why it keeps happening specifically only to Fly, since I’ve tested everywhere and wasn’t able to reproduce this reliably.

If you could identify the url that’s causing issues there may be ways to fix this by shortening the url somehow (the issue suggests the problem is with long urls).

I’ve tried all that I could on my end, and I simply could not reproduce this, this might be on the frontend side?