File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/urllib3/response.py", line 712, in _error_catcher
yield
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/urllib3/response.py", line 833, in _raw_read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
urllib3.exceptions.IncompleteRead: IncompleteRead(780 bytes read, 1904 more expected)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/requests/models.py", line 816, in generate
yield from self.raw.stream(chunk_size, decode_content=True)
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/urllib3/response.py", line 934, in stream
data = self.read(amt=amt, decode_content=decode_content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/urllib3/response.py", line 905, in read
data = self._raw_read(amt) ^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/urllib3/response.py", line 811, in _raw_read
with self._error_catcher():
File "/usr/lib/python3.11/contextlib.py", line 158, in __exit__
self.gen.throw(typ, value, traceback)
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/urllib3/response.py", line 729, in _error_catcher
raise ProtocolError(f"Connection broken: {e!r}", e) from e
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(780 bytes read, 1904 more expected)', IncompleteRead(780 bytes read, 1904 more expected))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/keystoneauth/keystoneauth1/session.py", line 1021, in _send_request
resp = self.session.request(method, url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/requests/sessions.py", line 747, in send
r.content
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/requests/models.py", line 899, in content
self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b"" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/.tox/py311/lib/python3.11/site-packages/requests/models.py", line 818, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(780 bytes read, 1904 more expected)', IncompleteRead(780 bytes read, 1904 more expected))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/keystoneauth/keystoneauth1/tests/unit/test_betamax_fixture.py", line 54, in test_keystoneauth_betamax_fixture
self._replay_cassette()
File "/tmp/keystoneauth/keystoneauth1/tests/unit/test_betamax_fixture.py", line 51, in _replay_cassette
s.get_token(auth=plugin)
File "/tmp/keystoneauth/keystoneauth1/session.py", line 1236, in get_token
return (self.get_auth_headers(auth) or {}).get('X-Auth-Token') ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/session.py", line 1214, in get_auth_headers
return auth.get_headers(self, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/plugin.py", line 106, in get_headers
token = self.get_token(session) ^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/identity/base.py", line 85, in get_token
return self.get_access(session).auth_token ^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/identity/base.py", line 131, in get_access
self.auth_ref = self.get_auth_ref(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/identity/v2.py", line 59, in get_auth_ref
resp = session.post(url, json=params, headers=headers, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/session.py", line 1162, in post
return self.request(url, 'POST', **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/session.py", line 930, in request
resp = send(**kwargs) ^^^^^^^^^^^^^^
File "/tmp/keystoneauth/keystoneauth1/session.py", line 1041, in _send_request
raise exceptions.UnknownConnectionError(msg, e)
keystoneauth1.exceptions.connection.UnknownConnectionError: Unexpected exception for http://keystoneauth-betamax.test/v2.0/tokens: ('Connection broken: IncompleteRead(780 bytes read, 1904 more expected)', IncompleteRead(780 bytes read, 1904 more expected))
Thanks for the fix. However, I'm afraid that doesn't resolve all the issues. After installing betamax from https:/ /github. com/jhatler/ betamax/, I get:
======= ======= ======= ======= == ======= ======= ======= ==
Failed 1 tests - output below:
=======
keystoneauth1. tests.unit. test_betamax_ fixture. TestBetamaxFixt ure.test_ keystoneauth_ betamax_ fixture ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -------
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ urllib3/ response. py", line 712, in _error_catcher
yield
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ urllib3/ response. py", line 833, in _raw_read self._fp_ bytes_read, self.length_ remaining)
raise IncompleteRead(
urllib3. exceptions. IncompleteRead: IncompleteRead(780 bytes read, 1904 more expected)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ requests/ models. py", line 816, in generate stream( chunk_size, decode_ content= True)
yield from self.raw.
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ urllib3/ response. py", line 934, in stream content= decode_ content)
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^
data = self.read(amt=amt, decode_
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ urllib3/ response. py", line 905, in read
^^^ ^^^^^^^ ^^^^^^^ ^^
data = self._raw_read(amt)
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ urllib3/ response. py", line 811, in _raw_read catcher( ):
with self._error_
File "/usr/lib/ python3. 11/contextlib. py", line 158, in __exit__ gen.throw( typ, value, traceback)
self.
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ urllib3/ response. py", line 729, in _error_catcher f"Connection broken: {e!r}", e) from e
raise ProtocolError(
urllib3. exceptions. ProtocolError: ('Connection broken: IncompleteRead(780 bytes read, 1904 more expected)', IncompleteRead(780 bytes read, 1904 more expected))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/keystonea uth/keystoneaut h1/session. py", line 1021, in _send_request request( method, url, **kwargs)
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^
resp = self.session.
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ requests/ sessions. py", line 589, in request
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^
resp = self.send(prep, **send_kwargs)
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ requests/ sessions. py", line 747, in send
r.content
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ requests/ models. py", line 899, in content self.iter_ content( CONTENT_ CHUNK_SIZE) ) or b""
^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^
self._content = b"".join(
File "/tmp/keystonea uth/.tox/ py311/lib/ python3. 11/site- packages/ requests/ models. py", line 818, in generate Error(e)
raise ChunkedEncoding
requests. exceptions. ChunkedEncoding Error: ('Connection broken: IncompleteRead(780 bytes read, 1904 more expected)', IncompleteRead(780 bytes read, 1904 more expected))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/keystonea uth/keystoneaut h1/tests/ unit/test_ betamax_ fixture. py", line 54, in test_keystoneau th_betamax_ fixture _replay_ cassette( )
self.
File "/tmp/keystonea uth/keystoneaut h1/tests/ unit/test_ betamax_ fixture. py", line 51, in _replay_cassette token(auth= plugin)
s.get_
File "/tmp/keystonea uth/keystoneaut h1/session. py", line 1236, in get_token auth_headers( auth) or {}).get( 'X-Auth- Token')
^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^
return (self.get_
File "/tmp/keystonea uth/keystoneaut h1/session. py", line 1214, in get_auth_headers headers( self, **kwargs)
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^
return auth.get_
File "/tmp/keystonea uth/keystoneaut h1/plugin. py", line 106, in get_headers token(session)
^^ ^^^^^^^ ^^^^^^^ ^^^^^^^
token = self.get_
File "/tmp/keystonea uth/keystoneaut h1/identity/ base.py" , line 85, in get_token access( session) .auth_token
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^
return self.get_
File "/tmp/keystonea uth/keystoneaut h1/identity/ base.py" , line 131, in get_access auth_ref( session)
^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^
self.auth_ref = self.get_
File "/tmp/keystonea uth/keystoneaut h1/identity/ v2.py", line 59, in get_auth_ref
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^
resp = session.post(url, json=params, headers=headers,
File "/tmp/keystonea uth/keystoneaut h1/session. py", line 1162, in post
^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^
return self.request(url, 'POST', **kwargs)
File "/tmp/keystonea uth/keystoneaut h1/session. py", line 930, in request
^^^ ^^^^^^^ ^^^^
resp = send(**kwargs)
File "/tmp/keystonea uth/keystoneaut h1/session. py", line 1041, in _send_request UnknownConnecti onError( msg, e)
raise exceptions.
keystoneaut h1.exceptions. connection. UnknownConnecti onError: Unexpected exception for http:// keystoneauth- betamax. test/v2. 0/tokens: ('Connection broken: IncompleteRead(780 bytes read, 1904 more expected)', IncompleteRead(780 bytes read, 1904 more expected))