Revert "revert disabling venv cache π" #93
GitHub Actions / Test Results
failed
Jun 23, 2024 in 0s
1 fail, 12 skipped, 1β097 pass in 6m 53s
1β110 testsβββ1β097 β
ββ6m 53s β±οΈ
ββββ4 suitesβββββ12 π€
ββββ4 filesββββββββ1 β
Results for commit e15ebf6.
Annotations
Check warning on line 0 in tests.integration_tests.test_token_metadata.TestTokenMetadata
github-actions / Test Results
test_from_storage (tests.integration_tests.test_token_metadata.TestTokenMetadata) failed
integration_test_results.xmlβ[took 4m 52s]
Raw output
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
self = <Response [504]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
> return complexjson.loads(self.text, **kwargs)
../../../.cache/pypoetry/virtualenvs/pytezos-fxeZDpKs-py3.10/lib/python3.10/site-packages/requests/models.py:974:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../.cache/pypoetry/virtualenvs/pytezos-fxeZDpKs-py3.10/lib/python3.10/site-packages/simplejson/__init__.py:514: in loads
return _default_decoder.decode(s)
../../../.cache/pypoetry/virtualenvs/pytezos-fxeZDpKs-py3.10/lib/python3.10/site-packages/simplejson/decoder.py:386: in decode
obj, end = self.raw_decode(s)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <simplejson.decoder.JSONDecoder object at 0x7f6f209d1f30>
s = '<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="utf-8" />\n<meta name="viewport" content="width=device-...ages"\n rel="noopener noreferrer">DAG</a>.</li>\n</ul> </section>\n </main>\n</body>\n\n</html>\n'
idx = 0, _w = <built-in method match of re.Pattern object at 0x7f6f2226a330>
_PY3 = True
def raw_decode(self, s, idx=0, _w=WHITESPACE.match, _PY3=PY3):
"""Decode a JSON document from ``s`` (a ``str`` or ``unicode``
beginning with a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
Optionally, ``idx`` can be used to specify an offset in ``s`` where
the JSON document begins.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
if idx < 0:
# Ensure that raw_decode bails on negative indexes, the regex
# would otherwise mask this behavior. #98
raise JSONDecodeError('Expecting value', s, idx)
if _PY3 and not isinstance(s, str):
raise TypeError("Input string must be text, not bytes")
# strip UTF-8 bom
if len(s) > idx:
ord0 = ord(s[idx])
if ord0 == 0xfeff:
idx += 1
elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
idx += 3
> return self.scan_once(s, idx=_w(s, idx).end())
E simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../.cache/pypoetry/virtualenvs/pytezos-fxeZDpKs-py3.10/lib/python3.10/site-packages/simplejson/decoder.py:416: JSONDecodeError
During handling of the above exception, another exception occurred:
self = <tests.integration_tests.test_token_metadata.TestTokenMetadata testMethod=test_from_storage>
def test_from_storage(self):
contract = pytezos.using('mainnet').contract('KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton')
> token_metadata = contract.token_metadata[24552]
tests/integration_tests/test_token_metadata.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/pytezos/contract/interface.py:51: in __getitem__
return self._fn(item)
src/pytezos/contract/interface.py:360: in _get_token_metadata
token_metadata = self._get_token_metadata_from_view(token_id)
src/pytezos/contract/interface.py:406: in _get_token_metadata_from_view
token_metadata_json = cast(ContractMetadata, self.metadata).tokenMetadata(token_id).storage_view()[1]
/usr/lib/python3.10/functools.py:981: in __get__
val = self.func(instance)
src/pytezos/contract/interface.py:326: in metadata
metadata = ContractMetadata.from_ipfs(parsed_url.netloc, self.context)
src/pytezos/contract/metadata.py:182: in from_ipfs
metadata_json = requests.get(f'{context.ipfs_gateway}/{multihash}').json()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [504]>, kwargs = {}
def json(self, **kwargs):
r"""Returns the json-encoded content of a response, if any.
:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
contain valid json.
"""
if not self.encoding and self.content and len(self.content) > 3:
# No encoding set. JSON RFC 4627 section 3 states we should expect
# UTF-8, -16 or -32. Detect which one to use; If the detection or
# decoding fails, fall back to `self.text` (using charset_normalizer to make
# a best guess).
encoding = guess_json_utf(self.content)
if encoding is not None:
try:
return complexjson.loads(self.content.decode(encoding), **kwargs)
except UnicodeDecodeError:
# Wrong UTF codec detected; usually because it's not UTF-8
# but some other 8-bit codec. This is an RFC violation,
# and the server didn't bother to tell us what codec *was*
# used.
pass
except JSONDecodeError as e:
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
try:
return complexjson.loads(self.text, **kwargs)
except JSONDecodeError as e:
# Catch JSON-related errors and raise as requests.JSONDecodeError
# This aliases json.JSONDecodeError and simplejson.JSONDecodeError
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
../../../.cache/pypoetry/virtualenvs/pytezos-fxeZDpKs-py3.10/lib/python3.10/site-packages/requests/models.py:978: JSONDecodeError
Loading