Skip to content
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

Linting Environment doesn't work with Python 3.12 yet #169

Open
hf-kklein opened this issue Jan 4, 2024 · 0 comments · May be fixed by #209
Open

Linting Environment doesn't work with Python 3.12 yet #169

hf-kklein opened this issue Jan 4, 2024 · 0 comments · May be fixed by #209

Comments

@hf-kklein
Copy link
Contributor

pylint crashed with a AstroidError and with the following stacktrace:

Traceback (most recent call last):
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/checkers/imports.py", line 858, in _get_imported_module
    return importnode.do_import_module(modname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/nodes/_base_nodes.py", line 146, in do_import_module
    return mymodule.import_module(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 530, in import_module
    return AstroidManager().ast_from_module_name(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/manager.py", line 246, in ast_from_module_name
    return self.ast_from_file(found_spec.location, modname, fallback=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/manager.py", line 138, in ast_from_file
    return AstroidBuilder(self).file_build(filepath, modname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/builder.py", line 144, in file_build
    module, builder = self._data_build(data, modname, path)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/builder.py", line 204, in _data_build
    module = builder.visit_module(node, modname, node_file, package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/rebuilder.py", line 254, in visit_module
    [self.visit(child, newnode) for child in node.body],
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/astroid/rebuilder.py", line 609, in visit
    visit_method = getattr(self, visit_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 811, in _lint_file
    check_astroid_module(module)
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 1085, in check_astroid_module
    retval = self._check_astroid_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 1135, in _check_astroid_module
    walker.walk(node)
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 94, in walk
    self.walk(child)
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 91, in walk
    callback(astroid)
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/checkers/imports.py", line 549, in visit_importfrom
    imported_module = self._get_imported_module(node, basename)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/checkers/imports.py", line 883, in _get_imported_module
    raise astroid.AstroidError from e
astroid.exceptions.AstroidError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 775, in _lint_files
    self._lint_file(fileitem, module, check_astroid_module)
  File "/home/runner/work/ebdtable2graph/ebdtable2graph/.tox/linting/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 813, in _lint_file
    raise astroid.AstroidError from e
astroid.exceptions.AstroidError

.
************* Module src.ebdtable2graph.kroki
src/ebdtable2graph/kroki.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/kroki.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/kroki.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-12.txt'. (astroid-error)
************* Module src.ebdtable2graph.graphviz
src/ebdtable2graph/graphviz.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/graphviz.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/graphviz.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-12.txt'. (astroid-error)
************* Module src.ebdtable2graph.add_watermark
src/ebdtable2graph/add_watermark.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/add_watermark.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/add_watermark.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-13.txt'. (astroid-error)
************* Module src.ebdtable2graph.graph_utils
src/ebdtable2graph/graph_utils.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/graph_utils.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/graph_utils.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-13.txt'. (astroid-error)
************* Module src.ebdtable2graph.graph_conversion
src/ebdtable2graph/graph_conversion.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/graph_conversion.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/graph_conversion.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-13.txt'. (astroid-error)
************* Module src.ebdtable2graph.plantuml
src/ebdtable2graph/plantuml.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/plantuml.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/plantuml.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-14.txt'. (astroid-error)
************* Module src.ebdtable2graph.models.ebd_graph
src/ebdtable2graph/models/ebd_graph.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/models/ebd_graph.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/models/ebd_graph.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-14.txt'. (astroid-error)
src/ebdtable2graph/models/ebd_graph.py:4:0: C0411: standard import "from abc import ABC, abstractmethod" should be placed before "import requests" (wrong-import-order)
************* Module src.ebdtable2graph.models.ebd_table
src/ebdtable2graph/models/ebd_table.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/models/ebd_table.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/models/ebd_table.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-14.txt'. (astroid-error)
************* Module src.ebdtable2graph.models.errors.init
src/ebdtable2graph/models/errors/init.py:1:0: F0002: /home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/models/errors/init.py: Fatal error while checking '/home/runner/work/ebdtable2graph/ebdtable2graph/src/ebdtable2graph/models/errors/init.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/runner/.cache/pylint/pylint-crash-2024-01-04-15-13-14.txt'. (astroid-error)

hf-kklein added a commit that referenced this issue May 3, 2024
@hf-kklein hf-kklein linked a pull request May 3, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant