question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught exception: TypeError: Protocols cannot be instantiated

See original GitHub issue

Summary

TypeError: Protocols cannot be instantiated in 1.12.0 After upgrading from 1.11.1 to 1.12.0, streamlit server keeps raising exceptions and clients get stuck at loading page ‘please wait…’

Steps to reproduce

server error snippet:

Traceback (most recent call last):
  File "/home/xx/.local/lib/python3.9/site-packages/tornado/http1connection.py", line 276, in _read_message
    delegate.finish()
  File "/home/xx/.local/lib/python3.9/site-packages/tornado/routing.py", line 268, in finish
    self.delegate.finish()
  File "/home/xx/.local/lib/python3.9/site-packages/tornado/web.py", line 2322, in finish
    self.execute()
  File "/home/xx/.local/lib/python3.9/site-packages/tornado/web.py", line 2344, in execute
    self.handler = self.handler_class(
  File "/home/xx/.local/lib/python3.9/site-packages/tornado/websocket.py", line 224, in __init__
    super().__init__(application, request, **kwargs)
  File "/home/xx/.local/lib/python3.9/site-packages/tornado/web.py", line 215, in __init__
    super().__init__()
  File "/usr/local/python3/lib/python3.9/typing.py", line 1083, in _no_init
    raise TypeError('Protocols cannot be instantiated')
TypeError: Protocols cannot be instantiated

Actual behavior:

Get stuck at loading page ‘please wait…’

Debug info

  • Streamlit version: 1.12.0
  • Python version: 3.9.7
  • Using Conda? PipEnv? PyEnv? Pex? using venv
  • OS version: Debian 10
  • Browser version: Chrome 104 and Safari 15

Additional information

Roll back to streamlit version 1.11.1, everything works fine.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

4reactions
nathancooperjonescommented, Aug 12, 2022

Confirmed that upgrading from Python 3.9.7 to 3.9.12 fixes the issue! 🎉

2reactions
DanielLenzcommented, Aug 12, 2022

Can confirm:

Debug info

  • Streamlit version: 1.12.0
  • Python version: 3.9.7
  • Using Conda? PipEnv? PyEnv? Pex?: I use venv
  • OS version: macOS 12.4, Apple M1 Pro
  • Browser version: Chrome 104.0.5112.79
Read more comments on GitHub >

github_iconTop Results From Across the Web

"streamlit hello" -- TypeError: Protocols cannot be instantiated
Hi There, I'm running a vanilla version of python through anaconda and installed the latest version of Streamlit using the command pip install...
Read more >
python - Streamlit - Protocols cannot be instantiated
It returns a TypeError: Protocols cannot be instantiated. Found a similar post mentioning installing a prior version, which resulted in the ...
Read more >
WebAssembly.instantiate() - MDN Web Docs
A Promise that resolves to an WebAssembly.Instance object. Exceptions. If either of the parameters are not of the correct type or structure, a ......
Read more >
r/Streamlit - Protocolls cannot be instantiated. I just started with ...
More posts you may like · Trying to set up a persistent command. · Uncaught TypeError: window. · node_modules require/fetch conflict · How...
Read more >
typing — Clifford 1.3.0 documentation
__parameters__: raise TypeError(f"{cls} is not a generic class") alen ... _is_protocol: raise TypeError('Protocols cannot be instantiated') def ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found