weird python type check issue… :thread:
# general
weird python type check issue… 🧵
just hoping, if this looks familiar to anyone by any chance… 🤞 ?
Copy code
16:10:06.75 [ERROR] Completed: Typecheck using MyPy - mypy failed (exit code 1).
Traceback (most recent call last):
  File "/private/var/folders/y2/6t5bbk554wv5h6w_qlgpcpnm0000gr/T/pants-sandbox-dSFLgJ/.cache/pex_root/venvs/b937c74c22b0d000ebb91030e0cdc9d4c9d625c4/b804a7d1f8bd9cd2ff386af6a48d90174070910e/pex", line 246, in <module>
  File "/Users/andreas.stenius/.cache/pants/named_caches/pex_root/venvs/s/e5420cff/venv/lib/python3.8/site-packages/mypy/", line 12, in console_entry
    main(None, sys.stdout, sys.stderr)
  File "mypy/", line 96, in main
  File "mypy/", line 173, in run_build
  File "mypy/", line 154, in build
  File "mypy/", line 230, in _build
  File "mypy/", line 2729, in dispatch
  File "mypy/", line 3087, in process_graph
  File "mypy/", line 3205, in process_stale_scc
  File "mypy/", line 2313, in write_cache
  File "mypy/", line 1471, in write_cache
  File "mypy/", line 1424, in json_dumps
  File "/Users/andreas.stenius/.pyenv/versions/3.8.13/lib/python3.8/json/", line 234, in dumps
    return cls(
  File "/Users/andreas.stenius/.pyenv/versions/3.8.13/lib/python3.8/json/", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/andreas.stenius/.pyenv/versions/3.8.13/lib/python3.8/json/", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/andreas.stenius/.pyenv/versions/3.8.13/lib/python3.8/json/", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type AnyType is not JSON serializable
not sure what I’ve done to get here 😛 but I’ll guess I’ll have to revert changes one by one to get back to a working state… (private repo tho, so can’t share the actual diff..)
👀 1
🤷 1
Ah, yes, upgrading
solved it.. 😅