pygwalker icon indicating copy to clipboard operation
pygwalker copied to clipboard

v0.1.9.1 to_html bug

Open longxiaofei opened this issue 1 year ago • 3 comments

Hi, I've tried to insert pygwalker into a Django div with mark_safe and file keeps loading forever. Looking at JavaScript console it throws this error twice: TypeError: t is undefined

This is my view:

from django.shortcuts import render
import pandas as pd
import pygwalker as pyg
from django.utils.safestring import mark_safe
def test(request):

    df = pd.read_csv("https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv",
                     parse_dates=['date'])
    div = mark_safe(pyg.to_html(df))
    return render(request, 'tests.html', {'div': div})

And in template I simply do {{ div }}

Could you help me with this? Thanks

Originally posted by @P3RI9 in https://github.com/Kanaries/pygwalker/issues/94#issuecomment-1597042897

longxiaofei avatar Jun 19 '23 13:06 longxiaofei

Hi, @P3RI9, I created an new issue to answer your question.

This is a bug in version 0.1.9.

You can try version 0.1.8 first to complete your code, this bug will be fixed in version 0.1.9.2.

pip install pygwalker==0.1.8

longxiaofei avatar Jun 19 '23 13:06 longxiaofei

Okay, thank you

P3RI9 avatar Jun 19 '23 14:06 P3RI9

fixed in version 0.1.10.

longxiaofei avatar Jun 23 '23 00:06 longxiaofei

No feedback for too long, so temporarily closing this issue. If there are any problems, it can be reopened.

longxiaofei avatar Jul 03 '23 03:07 longxiaofei