Skip to content

mypy fails while writing cache #3546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ronakts opened this issue Apr 6, 2022 · 1 comment
Closed

mypy fails while writing cache #3546

ronakts opened this issue Apr 6, 2022 · 1 comment

Comments

@ronakts
Copy link
Contributor

ronakts commented Apr 6, 2022

Thanks for taking the time for reporting an issue!

Before reporting an issue on dd-trace-py, please be sure to provide all
necessary information.

If you're hitting a bug, make sure that you're using the latest version of this
library.

Which version of dd-trace-py are you using?

0.60.1

Which version of pip are you using?

pip 22.0.4

ddtrace requires pip>=18 to install one of our pre-built wheels

Which version of the libraries are you using?

You can copy/paste the output of pip freeze here.

How can we reproduce your problem?

I randomly hit this issue when I run with mypy cache and do not encountered this issue when I run mypy without use of cache.

What is the result that you get?

mypy fails with this error:

LOG:  Processing SCC singleton (ddtrace.internal.atexit) as inherently stale
LOG:  Writing ddtrace.internal.atexit /opt/conda/envs/********3/lib/python3.10/site-packages/ddtrace/internal/atexit.py ddtrace/internal/atexit.meta.json ddtrace/internal/atexit.data.json
LOG:  Build finished in 73.491 seconds with 8396 modules, and 0 errors
Traceback (most recent call last):
  File "/opt/conda/envs/********3/lib/python3.10/runpy.py", line 196, in _run_module_as_****
    return _run_code(code, ****_globals, None,
  File "/opt/conda/envs/********3/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/conda/envs/********3/lib/python3.10/site-packages/mypy/__****__.py", line 34, in <module>
    console_entry()
  File "/opt/conda/envs/********3/lib/python3.10/site-packages/mypy/__****__.py", line 12, in console_entry
    ****(None, sys.stdout, sys.stderr)
  File "mypy/****.py", line 96, in ****
  File "mypy/****.py", line 173, in run_build
  File "mypy/build.py", line 180, in build
  File "mypy/build.py", line 256, in _build
  File "mypy/build.py", line 2727, in dispatch
  File "mypy/build.py", line 3075, in process_graph
  File "mypy/build.py", line 3193, in process_stale_scc
  File "mypy/build.py", line 2311, in write_cache
  File "mypy/build.py", line 1488, in write_cache
  File "mypy/nodes.py", line 344, in serialize
  File "mypy/nodes.py", line 3367, in serialize
  File "mypy/nodes.py", line 3304, in serialize
  File "mypy/nodes.py", line 956, in serialize
  File "mypy/types.py", line 1482, in serialize
  File "mypy/types.py", line 611, in serialize
  File "mypy/types.py", line 1079, in serialize
  File "mypy/nodes.py", line 2679, in fullname
AttributeError: attribute '_fullname' of 'TypeInfo' undefined


Exited with code exit status 1

What is the result that you expected?

I assume that mypy should not throw this error while writing cache for ddtrace/internal/atexit.py

@brettlangdon
Copy link
Member

@ronakts thank you for reporting. It looks like this is an issue with mypy that is already reported.

python/mypy#12475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants