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

"Uncaught ReferenceError: process is not defined" with the standalone mode

ninoseki opened this issue · comments

Hi, first of all thank you for creating this awesome library.
I found an issue in a report when settings standalone = True so let me share it.

Environment

$ python --version
Python 3.10.7

$ datapane --version
datapane, version 0.15.5 (local)

Steps to reproduce

# test.py
import pandas as pd
import datapane as dp

df = pd.read_csv(
    "https://covid.ourworldindata.org/data/vaccinations/vaccinations-by-manufacturer.csv",
    parse_dates=["date"],
)
df = (
    df.groupby(["vaccine", "date"])["total_vaccinations"].sum().tail(1000).reset_index()
)
app = dp.App(dp.DataTable(df))
html = app.stringify(standalone=True)

print(html)
python test.py > foo.html
python -m http.server 9999

And opens http://localhost:9999/foo.html then it shows a blank page because of Uncaught ReferenceError: process is not defined.

Screen Shot 2023-01-13 at 19 17 54

Close this issue since I'm able to confirm the problem is fixed in the latest version.