jrieke / streamlit-analytics

πŸ‘€ Track & visualize user interactions with your streamlit app
MIT License
262 stars 48 forks source link

TypeError when displaying the tracking analytics #28

Closed BillelBenoudjit closed 1 year ago

BillelBenoudjit commented 1 year ago

Got this issue when trying to displaying the tracking analytics with ?analytics=on. Any clues to fix this issue?

TypeError: metric() got an unexpected keyword argument 'help'
Traceback:
File "/usr/local/lib/python3.6/dist-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script
    exec(code, module.__dict__)
File "/home/ubuntu/SE_github/streamlit_apps/dev_pages/csv_merger.py", line 22, in <module>
    "...and now add `?analytics=on` to the URL to see the analytics dashboard πŸ‘€"
File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__
    next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/streamlit_analytics/main.py", line 440, in track
    verbose=verbose,
File "/usr/local/lib/python3.6/dist-packages/streamlit_analytics/main.py", line 405, in stop_tracking
    display.show_results(counts, reset_counts, unsafe_password)
File "/usr/local/lib/python3.6/dist-packages/streamlit_analytics/display.py", line 44, in show_results
    help="Every time a user (re-)loads the site.",
BillelBenoudjit commented 1 year ago

Found a clue on #23. It it a version issue, from version >= 1.11, st.metric() accepts a help attribute. Since I am on streamlit==1.10 I had to comment out the help attribute on the display.py file.