[BUG]: Access blocked to OpenStreetMaps raster tiles when saving the graph as .html file

Abierto
#5,798 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, python
Área
frontend, web-dev

Línea de trabajo

Start by comparing the generated output from write_html() with the behavior of show() and write_image() for the supplied Scattermap example using open-street-map. The issue does not name relevant source files or tests, so first trace how HTML export handles raster map tiles. Done means the saved HTML displays tiles without the OpenStreetMap access-blocked error.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug P3 size: 1
Description

When the scatter map is generated with the style set to open-street-map and then saved as an .html file the tiles are replaced with the error image with the text "403 Access blocked. App is not following the tile usage policy of OpenStreetMap's volunteer-run servers: osm.wiki/Blocked".

This happens when the write_html() method is called, but not when the write_image() method is called or the show() method is called in a Jupyter notebook.

This is different from the https://github.com/plotly/plotly.py/issues/5562 since that issue only concerns write_image() method.

Screenshots/Video
Image
Steps to reproduce
import plotly.graph_objects as go

lat = 41.580472
lon = -1.1161953

fig = go.Figure(go.Scattermap(
    lat=[lat],
    lon=[lon],
    mode='markers',
    marker=dict(symbol="circle", size=30)
))
fig.update_layout(
    map=dict(
        style="open-street-map",
        center=dict(lat=lat, lon=lon),
        zoom=16
    ),
    margin={"r": 0, "t": 0, "l": 0, "b": 0} 
)
# returns correct raster tiles
fig.write_image('1.png')
# returns error tiles
fig.write_html('1.html')

Notes

plotly version: 7.1.0

Lenguaje dominante
Python
Estrellas
18.9k
Forks
2.9k
Merge medio
1 d 22 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de plotly/plotly.py

Todos los issues de plotly/plotly.py

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.