-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
There is an issuse on the CDN used by pywebio, causing put_datatable() shows "⌛️ Loading Datatable..." forever.
To solve this problem, you can use the following workaround to change the CDN source. A new release will be coming soon to officially fix this issue.
import json
import urllib.request
import pywebio
from pywebio.output import put_datatable
def main():
pywebio.session.run_js(
"""
require.config({
paths: {
"ag-grid": "https://cdn.jsdelivr.net/npm/ag-grid-community@28.2.1/dist/ag-grid-community.min",
"ag-grid-enterprise": "https://cdn.jsdelivr.net/npm/ag-grid-enterprise@28.2.1/dist/ag-grid-enterprise.min",
},
});
"""
)
with urllib.request.urlopen("https://fakerapi.it/api/v1/persons?_quantity=30") as f:
data = json.load(f)["data"]
put_datatable(data)
if __name__ == "__main__":
pywebio.start_server(main, port=8080)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working