Skip to content

AttributeError: 'NoneType' object has no attribute 'accept' #1382

Closed
@alunduil

Description

@alunduil

This is possibly due to missing or outdated pyi files for colorama but reporting here to make sure it doesn't get lost. The trace is included below.

This was the result of running on a largish code base with --use-python-path where colorama is included as an indirect dependency.

Any pointers as to how to begin troubleshooting would be appreciated; I'm going to begin by investigating the typeshed for colorama.

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module>
    main(__file__)
  File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 52, in main
    res = type_check_only(sources, bin_dir, options)
  File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 100, in type_check_only
    python_path=options.python_path)
  File "/usr/lib64/python3.4/site-packages/mypy/build.py", line 207, in build
    dispatch(sources, manager)
  File "/usr/lib64/python3.4/site-packages/mypy/build.py", line 1180, in dispatch
    process_graph(graph, manager)
  File "/usr/lib64/python3.4/site-packages/mypy/build.py", line 1298, in process_graph
    process_stale_scc(graph, scc)
  File "/usr/lib64/python3.4/site-packages/mypy/build.py", line 1328, in process_stale_scc
    graph[id].type_check()
  File "/usr/lib64/python3.4/site-packages/mypy/build.py", line 1162, in type_check
    manager.type_checker.visit_file(self.tree, self.xpath)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 416, in visit_file
    self.accept(d)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 457, in accept
    typ = node.accept(self)
  File "/usr/lib64/python3.4/site-packages/mypy/nodes.py", line 896, in accept
    return visitor.visit_try_stmt(self)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 1762, in visit_try_stmt
    self.accept(s.else_body)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 457, in accept
    typ = node.accept(self)
  File "/usr/lib64/python3.4/site-packages/mypy/nodes.py", line 715, in accept
    return visitor.visit_block(self)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 1133, in visit_block
    self.accept(s)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 457, in accept
    typ = node.accept(self)
  File "/usr/lib64/python3.4/site-packages/mypy/nodes.py", line 462, in accept
    return visitor.visit_func_def(self)
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 601, in visit_func_def
    'redefinition with type')
  File "/usr/lib64/python3.4/site-packages/mypy/checker.py", line 2147, in check_subtype
    if not is_subtype(subtype, supertype):
  File "/usr/lib64/python3.4/site-packages/mypy/subtypes.py", line 49, in is_subtype
    return left.accept(SubtypeVisitor(right, type_parameter_checker))
AttributeError: 'NoneType' object has no attribute 'accept'

*** INTERNAL ERROR ***

/usr/lib64/python3.4/site-packages/colorama/win32.py:97: error: Internal error -- please report a bug at https://github.com/python/mypy/issues

NOTE: you can use "mypy --pdb ..." to drop into the debugger when this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions