A new version of Streamlit is available.
See what's new at https://discuss.streamlit.io/c/announcements
Enter the following command to upgrade:
$ pip install streamlit --upgrade
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.100.168:8501
2021-12-14 02:31:00.907 Uncaught exception GET /stream (::1)
HTTPServerRequest(protocol='http', host='localhost:8501', method='GET', uri='/stream', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\web.py", line 1704, in _execute
result = await result
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 278, in get
await self.ws_connection.accept_connection(self)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 879, in accep
t_connection
await self._accept_connection(handler)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 962, in _acce
pt_connection
await self._receive_frame_loop()
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 1116, in _rec
eive_frame_loop
await self._receive_frame()
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 1205, in _rec
eive_frame
handled_future = self._handle_message(opcode, data)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 1217, in _han
dle_message
data = self._decompressor.decompress(data)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tornado\websocket.py", line 798, in decom
press
result = decompressor.decompress(
TypeError: 'float' object cannot be interpreted as an integer
C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\altair\utils\core.py:185: UserWarning: I don't kn
ow how to infer vegalite type from 'empty'. Defaulting to nominal.
warnings.warn(
Can you post a snippet of code that demonstrates this behavior, either pasting here or linking to GitHub. The error message of TypeError: 'float' object cannot be interpreted as an integer is unfortunately not very descriptive by Python
Hi @randyzwitch , thank you for replying.
But i think its not the code problems, i dont know why my localhost became slower from the first and i cant even rerun that. Any solution?
I had a similar error. The problem it turned out was that one function of my script changes the working directory (CWD) and it’s not rest back to the streamlit app dir. The error was fixed when I changed the cwd back after the said function has returned. Hope this helps you.
File “C:\Users\user-id\AppData\Roaming\Python\Python310\site-packages\tornado\websocket.py”, line 1207, in _handle_message*
data = self._decompressor.decompress(data)*
File “C:\Users\user-id\AppData\Roaming\Python\Python310\site-packages\tornado\websocket.py”, line 786, in decompress*
result = decompressor.decompress(* TypeError: ‘float’ object cannot be interpreted as an integer
Does anyone have an idea how to solve this? @MatG: Could you explain how you changed the cwd within the Python code? My apologies, I am rather new to programming & Python and do not know how exactly I can reset the directory within my two-line code…