444B / streamlit-analytics2

👀 Track & visualize user interactions with your streamlit app
MIT License
14 stars 2 forks source link

[BUG] Graph does not display #45

Closed Dahie closed 4 months ago

Dahie commented 4 months ago

Describe the bug I integrated streamlit-analytics2 in my streamlit app, open the app in my browser with the parameter analytics=on, but the graphs are not displayed.

To Reproduce You can use this boilerplate, to simulate: https://github.com/WhatAVenture/wav-streamlit-boilerplate

  1. Run the app
  2. Open http://localhost:8501?analytics=on
  3. It opens the page, but without showing the analytics summary and timeline.

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

Desktop (please complete the following information):

Additional context I have the same issue in a different project, but the boilerplate shows it clearest.

444B commented 4 months ago

@Dahie thanks for raising the bug?

  1. Can you confirm if your file that uses streamlit has the following:
Import streamlit_analytics2 as streamlit_analytics
  1. Did you install streamlit_analytics2 via pip? If you deployed somewhere, did you accordingly update your requirements.txt or pipfile?

  2. Can you share errors or a screenshot of what is shown?

Dahie commented 4 months ago
  1. yes, see: https://github.com/WhatAVenture/wav-streamlit-boilerplate/blob/a9866a99a899218a9ae24532db4f831f49d98a28/wav_streamlit_boilerplate/app.py#L3
  2. kinda, I use poetry for dependency management, but it's correctly in the dependencies and it is tracking data: https://github.com/WhatAVenture/wav-streamlit-boilerplate/blob/a9866a99a899218a9ae24532db4f831f49d98a28/poetry.lock#L1875
  3. I get no error and it just does not display, so there is nothing to screenshot.
444B commented 4 months ago

Investigation notes:

Next steps:

444B commented 4 months ago

Investigation notes2:

image

Next steps: @Dahie does this fit in with the way you might have been setting up the environment? I cant see anything wrong with your setup or dependencies. What are your thoughts? I can not find an issue with the way streamlit_analytics is being called or version 0.5.3

Dahie commented 4 months ago

This is how I set it up as well. Will also investigate further. Thanks!

444B commented 4 months ago

Sure, no worries! Comment back here if you have any findings ill close the issue later this week without further comments

Dahie commented 4 months ago

ok, I found my issue. I was using the wrong parameter value in my tests. http://localhost:8501?analytics=true instead of on

Sorry, of the inconvenience. 😅