1

Get the following error when trying to start up a docker container.

web       | Traceback (most recent call last):
web       |   File "app.py", line 4, in <module>
web       |     from quart import Quart, render_template, redirect, request, url_for
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/quart/__init__.py", line 7, in <module>
web       |     from .app import Quart
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/quart/app.py", line 38, in <module>
web       |     from hypercorn.asyncio import serve
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/hypercorn/asyncio/__init__.py", line 6, in <module>
web       |     from .run import worker_serve
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/hypercorn/asyncio/run.py", line 16, in <module>
web       |     from .tcp_server import TCPServer
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/hypercorn/asyncio/tcp_server.py", line 11, in <module>
web       |     from ..protocol import ProtocolWrapper
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/hypercorn/protocol/__init__.py", line 5, in <module>
web       |     from .h2 import H2Protocol
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/hypercorn/protocol/h2.py", line 22, in <module>
web       |     from .ws_stream import WSStream
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/hypercorn/protocol/ws_stream.py", line 9, in <module>
web       |     from wsproto.connection import Connection, ConnectionState, ConnectionType
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/wsproto/__init__.py", line 9, in <module>
web       |     from .connection import Connection, ConnectionState, ConnectionType
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/wsproto/connection.py", line 23, in <module>
web       |     from .utilities import LocalProtocolError
web       |   File "/opt/pypy/lib/pypy3.9/site-packages/wsproto/utilities.py", line 12, in <module>
web       |     from h11._headers import Headers as H11Headers
web       | ImportError: cannot import name 'Headers' from 'h11._headers' (/opt/pypy/lib/pypy3.9/site-packages/h11/_headers.py)
web exited with code 1'''

Have been running this code for several months with no issue and this seems to be a new error on a rebuild.

Get the same error whether using pypy3.8, pypy3.9, python3.10

Since it is a clean build (docker system purge), Quart is forced to rebuild. I can't see why it would be failing on a dependency of an old build. The only other recommendation I can find was to rebuild 'requests'.

Using pip to install Quart

Bob Karschnia
  • 11
  • 1
  • 3

1 Answers1

0

It is useful for me to upgrade all the dependencies in your libs. Sorry for my bad English. (my version: python 3.10.7)

first:

pip install pip-review

then:

py -3 -m pip-review --local --interactive

maybe some packages need permissions:

py -3 -m pip-review --local --interactive --user

Then restart your vscode, done.

brianoy
  • 1
  • 1