SENATOROVAI / pre-commit

MIT License
3 stars 4 forks source link

F0002: scripts\build_directory_md.py: Fatal error while checking 'scripts\build_directory_md.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in 'C:\Users\burya\AppData\Local\pylint\pylint\Cache\pylint-crash-2024-10-27-14.txt'. (astroid-error) #11

Closed fromanew closed 2 weeks ago

fromanew commented 2 weeks ago

Hash commit / link

No response

Video

No response

Attach a screenshot and write what did you do to fix the problem?

image

Error from the terminal / Code

Exception on node <Import l.5 at 0x1a8256f3830> in file 'C:\Users\burya\Documents\github\datascience-Roma\scripts\build_directory_md.py' Traceback (most recent call last): File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\pylint\utils\ast_walker.py", line 90, in walk callback(astroid) File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\pylint\checkers\imports.py", line 482, in visit_import
self._add_imported_module(node, imported_module.name) File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\pylint\checkers\imports.py", line 800, in _add_imported_module importedmodname = astroid.modutils.get_module_part( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\modutils.py", line 404, in get_module_part file_from_modpath( File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\modutils.py", line 300, in file_from_modpath
return file_info_from_modpath(modpath, path, context_file).location ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\modutils.py", line 350, in file_info_from_modpath
return _spec_from_modpath(modpath, path, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\modutils.py", line 563, in _spec_from_modpath
found_spec = spec.find_spec(modpath, [context]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\interpreter_import\spec.py", line 368, in find_spec finder, spec = _find_spec_with_path( ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\interpreter_import\spec.py", line 332, in _find_spec_with_path spec = finder.find_module(modname, module_parts, processed, submodule_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\interpreter_import\spec.py", line 207, in find_module file_type, filename, path = _search_zip(module_parts, self._zipimporters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\burya.cache\pre-commit\repoueptbfk7\py_env-python3.12\Lib\site-packages\astroid\interpreter_import\spec.py", line 313, in _search_zip found = importer.find_module(modpath[0]) ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'zipimporter' object has no attribute 'find_module'. Did you mean: 'load_module'? ***** Module build_directory_md scripts\build_directory_md.py:1:0: F0002: scripts\build_directory_md.py: Fatal error while checking 'scripts\build_directory_md.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in 'C:\Users\burya\AppData\Local\pylint\pylint\Cache\pylint-crash-2024-10-27-14.txt'. (astroid-error)


Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)

nbqa-pydocstyle..........................................................Passed PS C:\Users\burya\Documents\github\datascience-Roma>

Expected behavior

linter has no error

Actual behavior

pre-commit run --all-files

ruslansenatorov commented 2 weeks ago

taken on board