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

Offen
#5,798 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, python
Bereich
frontend, web-dev

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Python
Sterne
18.9k
Forks
2.9k
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus plotly/plotly.py

Alle Issues in plotly/plotly.py

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.