streamlit: Mapping and DataFrame demo apps through errors
Summary
While going through the demos provided in hello app I have encountered problems with two out of four (Mapping and DataFrame demo apps) through errors.
Steps to reproduce
- mkvirtualenv streamllit
- pip install streamlit
- streamlit hello
- Click on
Mapping DemoorDataFrame Demo
Expected behavior:
I would expect demos would be shown in the right pain. It works as expected for the first two apps (Animation and Plotting Demo).
Actual behavior:
I get notifications, first
Streamlit cannot hash an object of type <class 'os._Environ'>.,
...
and then 6 of these
Streamlit failed to hash an object of type <class 'function'>.,
...
and at the end there is a traceback:
TypeError: object supporting the buffer API required
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/ScriptRunner.py", line 306, in _run_script exec(code, module.__dict__)
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/hello.py", line 334, in <module> run()
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/hello.py", line 308, in run demo()
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/hello.py", line 78, in mapping_demo "data": from_data_file("bike_rental_stats.json"),
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/caching.py", line 544, in wrapped_func return get_or_set_cache()
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/caching.py", line 509, in get_or_set_cache code_hasher.update(func)
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/hashing.py", line 185, in update self._update(self.hasher, obj, context)
File "/home/vaidas/.virtualenvs/streamlit/lib/python3.6/site-packages/streamlit/hashing.py", line 217, in _update hasher.update(b)
Is this a regression?
Tried to launch it for the first time.
Debug info
- Streamlit version: 0.47.4
- Python version: Python 3.6.8
- Using virtualenv with virtualenvwrapper
- OS version: Ubuntu 18.04
- Browser version: Chrome Version 77.0.3865.90
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 15 (1 by maintainers)
same error; Streamlit, version 0.47.4 Ubuntu 18.10 Python 3.6.8
However - trying python 2.7.15+ on the same OS DID work!
So it looks like they’ve tested it on Python 2 mostly and not really done much running on Python 3. Shame, considering Python 2 will reach the end of its life on January 1st, 2020.