Kanaries / pygwalker

PyGWalker: Turn your pandas dataframe into an interactive UI for visual analysis
https://kanaries.net/pygwalker
Apache License 2.0
10.7k stars 545 forks source link

[BUG] pygwalker bug report: retrieving specs when app URL has path #564

Closed thomasbs17 closed 1 month ago

thomasbs17 commented 1 month ago

Describe the bug It looks like Pygwalker cannot read specs when the app's url is composed of a host + path. Writting seems fine though. For example, I have an app deployed with the following URL structure: ORIGIN/PATHNAME

This URL structure comes from corporate constraints within the company I work for.

I have taken a look at "pygwalkjer-app.iife.js", which I believe is generated by "communication.tsx", and I see this: i=/${e}/${A}

I believe this should be updated to i=${window.parent.document.location.href}/${e}/${A}

To Reproduce Steps to reproduce the behavior:

  1. Deploy your Streamlit app with the following URL structure: i=/${e}/${A}
  2. Use the following Python code

StreamlitRenderer(dataset=df, spec=PATH_TO_SPEC, spec_io_mode="rw")

  1. Try load your Pygwalker chart
  2. The page gets stuck on "Loading Graphic- Walker UI..."

Screenshots If applicable, add screenshots to help explain your problem.

Versions

Additional context I have opened a PR to address this issue: https://github.com/Kanaries/pygwalker/pull/563

longxiaofei commented 1 month ago

Hi @thomasbs17 .

I urgently released a pre-release version to solve this bug, pip install pygwalker==0.4.8.9a0.

Looking forward to your feedback.

thomasbs17 commented 1 month ago

Hi @longxiaofei , I can confirm that my issue is resolved using version 0.4.8.9a0. Thank you so much for the amazing turnaround and, overall, for the great package!