-
Notifications
You must be signed in to change notification settings - Fork 262
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 404 on leaflet.py example #741
Comments
I can reproduce that it does not work. The first exception is when the script tries to obtain So it may be related to the user agent - perhaps leaflet is trying to prevent non-browsers from using the API |
It looks like it needs an "Accept-Encoding" header.
doesn't work, but
does. |
Thanks @jrversteegh, that explains it, and I manage to get the example working again in #742. @Galeras14 Could you please check whether #742 fixes it for you to? |
Hi, thanks a lot for your help. However I'm still having trouble. assert res.ok, f"{res.status_code}: {res.reason}" In addition, I'm now having a warning message: /Users/admin/PycharmProjects/Genealogie/env/lib/python3.7/site-packages/urllib3/init.py:38: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020 Not sure if it is Mac environment or if it is because I'm using Python 3.8. |
Is that the system Python 3.8? Have you tried upgrading to the latest urllib3 using e.g. |
Yes, I'm in the latest version of urllib3, 2.0.7 |
I've kind of solve the issue of urllib3 following #3020 issue on urllib3. Traceback (most recent call last): |
Mmm. It's pretty annoying that leaflet produces a 404, and not a more meaningful error code. This way there is no way to see whether the problem is the header or your wifi being down 😕 I tried #742 and I got the same error. It looks like I was trying out some stuff and pushed the wrong version. I updated that PR to the version that works for me too. Sorry for that! edited: I initially linked to the wrong pr above because of a typo, which I now fixed |
With your modification, the example works for me and my app works again. |
Hi
I created a web-app based on the leaflet.py example. It has worked fine for several years but after a few month since I did not use (Jan 2023), I get a "urllib.error.HTTPError: HTTP Error 404: Not Found".
So, I got back to the leaflet.py code from flexx readthedocs and test it as is --> the example return the same error.
What has change since the beginning of the year that makes this example to stop working ?
Thanks for any help,
The text was updated successfully, but these errors were encountered: