datapane / datapane

Build and share data reports in 100% Python

Home Page:https://datapane.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App.save is saving singlehtml file in local but still trying to wrongly upload to events.datapane.com server

purnendumaity opened this issue · comments

System Information

  • OS: Windows 11
  • Python version: 3.10
  • Python environment: pip
  • Using jupyter: false, doing coding in Pycharm community IDE
  • Datapane version: 0.15.4

Bug / Issue

`import altair as alt
import datapane as dp
from vega_datasets import data
source= data.cars()
plot1 = (
    alt.Chart(source)
    .mark_circle(size=60)
    .encode(
        x="Horsepower",
        y="Miles_per_Gallon",
        color="Origin",
        tooltip=["Name", "Origin", "Horsepower", "Miles_per_Gallon"],
    )
    .interactive()
)
app = dp.App("MyFirstapp", dp.Plot(plot1,caption ="myplot"),
             dp.DataTable(source,caption="mydata"))
mypath="D:/Python-Projects/datapanetest/mytest.html"
app.save(path=mypath,open=False,standalone=True,cdn_base=None)`

Below is the error screenshot
datapane calling upload during save

This is actually not uploading the report to datapane.com, but sending analytics events to our servers.

For this situation (where the server is unreachable for whatever reason), we shouldn't be crashing but failing more gracefully. We already have an issue logged for this, and will hopefully be able to fix it soon.

As a workaround, however, it is possible to possible to disable these analytics, which should fix the issue for you: https://github.com/datapane/datapane#analytics

ok cool, disabling the analytics is a quick fix.. thanks a lot for your reply, you can close the issue.