telosnetwork / telos-evm-docker

Automated Telos EVM development and automated test framework
Apache License 2.0
12 stars 3 forks source link

Pin urllib3 to 1.26.18 #132

Closed guilledk closed 1 year ago

guilledk commented 1 year ago

Tom ran into this today:

Traceback (most recent call last):
  File "/home/tom/telos-evm-docker/.venv/bin/tevmc", line 6, in <module>
    sys.exit(cli())
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/tom/telos-evm-docker/tevmc/cmdline/up.py", line 153, in up
    with TEVMController(
  File "/home/tom/telos-evm-docker/tevmc/tevmc.py", line 1201, in __enter__
    self.start()
  File "/home/tom/telos-evm-docker/tevmc/tevmc.py", line 1120, in start
    self.start_redis()
  File "/home/tom/telos-evm-docker/tevmc/tevmc.py", line 384, in start_redis
    for msg in self.stream_logs('redis'):
  File "/home/tom/telos-evm-docker/tevmc/tevmc.py", line 308, in stream_logs
    for chunk in docker_stream_logs(
  File "/home/tom/telos-evm-docker/tevmc/utils.py", line 354, in docker_stream_logs
    response = session.get(
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 791, in urlopen
    response = self._make_request(
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 497, in _make_request
    conn.request(
TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked'
13:07:25:INFO:stopping container "redis-2697413-telos-local"
Exception ignored in: <generator object TEVMController.open_container at 0x7f153f6fe9d0>
Traceback (most recent call last):
  File "/home/tom/telos-evm-docker/tevmc/tevmc.py", line 273, in open_container
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/docker/models/containers.py", line 277, in kill
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/docker/utils/decorators.py", line 19, in wrapped
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/docker/api/container.py", line 807, in kill
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/docker/api/client.py", line 233, in _post
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/sessions.py", line 637, in post
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 791, in urlopen
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 537, in _make_request
  File "/home/tom/telos-evm-docker/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 458, in getresponse
ImportError: sys.meta_path is None, Python is likely shutting down

The fix is related to this:

https://github.com/docker/docker-py/issues/3113#issuecomment-1531570788

Fix is simple, pin urllib3 to specific version.