Mapping and DataFrame demo apps through errors
See original GitHub issueSummary
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 Demo
orDataFrame 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Apply Functions to Pandas DataFrame Using map, apply ...
What is Pandas map, apply, applymap and pipe? Photo by Sid Balachandran ... We will go through each one of them in detail...
Read more >Difference between map, applymap and apply methods in ...
The applymap() method only works on a pandas Dataframe where a function is applied to every element individually. The function passed as an ......
Read more >Encoder error while trying to map dataframe row to updated row
Unable to find encoder for type stored in a Dataset. Primitive types (Int, S tring, etc) and Product types (case classes) are supported...
Read more >Common errors that may occur during editing—Help
For example, if the data you chose to edit is in a different coordinate system than the data frame, an information message appears...
Read more >Pythonic Data Cleaning With Pandas and NumPy
Let's look at a simple example where we drop a number of columns from a DataFrame . First, let's create a DataFrame out...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Agreed with @roycoding. This looks like a dupe of #242. (Thanks Roy!)
The fix is coming soon with PR #254
(Closing this as a duplicate. Please reopen if you think this is not right)