Scattermap working in Windows, not in Linux

Hello, I have a Shiny for Python app in which I have switched from go.Scattermapbox to go.Scattermap. I develop on Windows, and deploy to an in-house Ubuntu box using shiny-server.

The dashboard has a map plot which looks good on Windows (using the built-in debug web-server in shiny), but gives an empty plot with erroneous axis scales on Liinux (using shiny-server).

I notice that the plots on Windows claim to be produced with Plotly.js 2.35.2, while on Linux they are made with Plotly.js 2.32.0. This appears interesting since the switch to MapLibre is said to occur from plotly.js version 2.35.0. I assume plotly.js came with plotly.py 5.24.1 on both platforms. How do I get Ubuntu to use the newest plotly.js file?

A number of other plots and subplots look equally fine in the two, it is just the map that is failing.

I use a virtual environment, and have nearly identical requirements.txt on the two installations. For different reasons, it is Python 3.12 running on Windows, python 3.9 on Ubuntu. The Ubuntu box is server-only, so I cannot (or lack the competence to) debug using localhost there.

Is this something I can repair with limited Ubuntu knowledge, or should I switch back to MapBox?

Hey @SjurK pretty difficult to say. I would try replicating the ubuntu environment on windows. At least I would install the same plotly version as on the ubuntu machine.

Maybe you’ll have to dig a bit deeper into the release notes of the python package, as you are referring to the js. version.

1 Like

Hello @AIMPED, thanks for reponding.
The plotly.py version is the same (5.24.1) on Windows and Ubuntu. On both platforms, I find a plotly.min.js file in the /venv/Lib/site-packages/plotly/package_data/ folder, and on both platforms, this file lists in its header comments plotly.js v2.35.2. Why (or whether?) the plotly.js library actually being called is different, I don’t know; I don’t speak Javascript and have not downloaded any .js file explicitly. The only hint I have on the difference in .js version is what the plots’ auto-generated toolbar displays in the web browser.
By the way, I tried switching back from ScatterMap to ScatterMapbox, and then it all works nicely. Plotly Is Switching to MapLibre as the rendering library for all