-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
type:bugSomething isn't working as expectedSomething isn't working as expected
Description
I am getting a TypeError that has no associated line number reference in my Streamlit app code. This makes it impossible to track down. Here is the error:
TypeError: keys must be str, int, float, bool or None, not numpy.int64
Traceback:
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/site-packages/streamlit/__init__.py", line 442, in write
json(arg)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/site-packages/streamlit/__init__.py", line 152, in wrapped_method
return method.__get__(dg)(*args, **kwargs)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/site-packages/streamlit/DeltaGenerator.py", line 135, in wrapped_method
return dg._enqueue_new_element_delta(marshall_element, delta_type, last_index)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/site-packages/streamlit/DeltaGenerator.py", line 392, in _enqueue_new_element_delta
rv = marshall_element(msg.delta.new_element)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/site-packages/streamlit/DeltaGenerator.py", line 133, in marshall_element
return method(dg, element, *args, **kwargs)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/site-packages/streamlit/DeltaGenerator.py", line 645, in json
else json.dumps(body, default=lambda o: str(type(o)))
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/home/fonnesbeck/anaconda3/envs/heat_maps/lib/python3.7/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
Notice that all of the traceback info is for library code, and no application code.
Debug info
- Streamlit version: 0.52.2
- Python version: 3.7.4
- Using Conda
- OS version: Debian 9
- Browser version: Chrome 80
Metadata
Metadata
Assignees
Labels
type:bugSomething isn't working as expectedSomething isn't working as expected