Closed homosapien-lcy closed 1 year ago
For the record, this is the image that the example try to load: "http://eoimages.gsfc.nasa.gov/ve//2433/land_shallow_topo_2048.jpg" (https://github.com/enthought/chaco/blob/main/examples/demo/world_map.py#L37)
We could replace it with https://neo.gsfc.nasa.gov/servlet/RenderData?si=1845687&cs=rgb&format=JPEG&width=720&height=360
We could replace it with https://neo.gsfc.nasa.gov/servlet/RenderData?si=1845687&cs=rgb&format=JPEG&width=720&height=360
After replacing with this link, a 403 error is caused.
How about this world map: https://upload.wikimedia.org/wikipedia/commons/9/91/Winkel_triple_projection_SW.jpg
@homosapien-lcy
In [1]: import requests
In [2]: requests.get('https://neo.gsfc.nasa.gov/servlet/RenderData?si=1845687&cs=rgb&format=JPEG&width=720&height=360')
Out[2]: <Response [200]>
https://neo.gsfc.nasa.gov/servlet/RenderData?si=1845687&cs=rgb&format=JPEG&width=720&height=360
Yeah, if you use requests it will work, but here is what I get if placing it in the world_map demo:
Downloading map image
Traceback (most recent call last):
File "examples/demo/world_map.py", line 132, in
image_url = Str( "https://neo.gsfc.nasa.gov/servlet/RenderData?si=1845687&cs=rgb&format=JPEG&width=720&height=360" )
Fixed in PR #864
Problem Description: HTTP 404 error when running the demo
Reproduction Steps: python chaco/examples/demo/world_map.py
Expected behavior: image gets downloaded and demo success
OS, Python version: [MacOS, Python3.8 or Python3.11]