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.

AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL

See original GitHub issue

Problem Description

$ mitmweb 
Traceback (most recent call last):
  File "/home/apu/.local/bin/mitmweb", line 5, in <module>
    from mitmproxy.tools.main import mitmweb
  File "/home/apu/.local/lib/python3.7/site-packages/mitmproxy/tools/main.py", line 22, in <module>
    from ._main import *  # noqa
  File "/home/apu/.local/lib/python3.7/site-packages/mitmproxy/tools/_main.py", line 17, in <module>
    from mitmproxy import proxy
  File "/home/apu/.local/lib/python3.7/site-packages/mitmproxy/proxy/__init__.py", line 2, in <module>
    from .root_context import RootContext
  File "/home/apu/.local/lib/python3.7/site-packages/mitmproxy/proxy/root_context.py", line 4, in <module>
    from mitmproxy.proxy import protocol
  File "/home/apu/.local/lib/python3.7/site-packages/mitmproxy/proxy/protocol/__init__.py", line 36, in <module>
    from .http2 import Http2Layer
  File "/home/apu/.local/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http2.py", line 7, in <module>
    from h2 import connection
  File "/home/apu/.local/lib/python3.7/site-packages/h2/connection.py", line 23, in <module>
    from .events import (
  File "/home/apu/.local/lib/python3.7/site-packages/h2/events.py", line 14, in <module>
    from .settings import ChangedSetting, _setting_code_from_int
  File "/home/apu/.local/lib/python3.7/site-packages/h2/settings.py", line 25, in <module>
    class SettingCodes(enum.IntEnum):
  File "/home/apu/.local/lib/python3.7/site-packages/h2/settings.py", line 60, in SettingCodes
    ENABLE_CONNECT_PROTOCOL = SettingsFrame.ENABLE_CONNECT_PROTOCOL
AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'

Steps to reproduce the behavior:

  1. pip3 install mitmproxy
  2. cmd run mitmweb

System Information

$ pip3 list | grep mitmproxy
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
mitmproxy                5.1.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

6reactions
MetalPortcommented, Jun 5, 2021

(Apuyuseng) Son of a gun! It worked!!!

6reactions
Apuyusengcommented, Jun 2, 2020

need upgrade h2

pip3 install --upgrade h2
Read more comments on GitHub >

github_iconTop Results From Across the Web

Scrapy - AttributeError: type object 'SettingsFrame' has no ...
First try upgrading h2, conda install -c conda-forge h2 , or with pip ... Inside "class SettingsFrame(Frame)" add the following line:
Read more >
type object 'SettingsFrame' has no attribute ...
type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'. This error appears to be generated from the h2 package.
Read more >
AttributeError: type object 'SettingsFrame' has no attribute ...
Coding example for the question AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'
Read more >
Scrapy 报错AttributeError: type object 'SettingsFrame' has no ...
Scrapy 报错AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'. 报错代码 如上图为报错代码解决办法:更新h2 ...
Read more >
HTTP/2 | Node.js v19.3.0 Documentation
It is possible for Node.js to be built without including support for the ... settings <HTTP/2 Settings Object> A copy of the SETTINGS...
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