Skip to content

ImportError: Circular import between cache.py and config/manager.py in Python 3.14 #1694

@Li12137

Description

@Li12137

ERROR:robotcode.language_server.common.parts.diagnostics.DiagnosticsProtocolPart:ImportError: cannot import name 'RobocopCache' from partially initialized module 'robocop.cache' (most likely due to a circular import) (d:\Python\Python314\Lib\site-packages\robocop\cache.py)
Traceback (most recent call last):
File "c:\Users\LLL.vscode\extensions\d-biehl.robotcode-2.2.0\bundled\libs\robotcode\core\event.py", line 85, in _notify
yield method(*__args, **_kwargs)
~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\LLL.vscode\extensions\d-biehl.robotcode-2.2.0\bundled\libs\robotcode\language_server\robotframework\parts\robocop_diagnostics.py", line 60, in collect_diagnostics
return DiagnosticsResult(self.collect_diagnostics, self.collect(document, workspace_folder))
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\LLL.vscode\extensions\d-biehl.robotcode-2.2.0\bundled\libs\robotcode\language_server\robotframework\parts\robocop_diagnostics.py", line 72, in collect
from robocop.linter.runner import RobocopLinter
File "d:\Python\Python314\Lib\site-packages\robocop\linter\runner.py", line 11, in
from robocop.cache import restore_diagnostics
File "d:\Python\Python314\Lib\site-packages\robocop\cache.py", line 17, in
from robocop.config import defaults
File "d:\Python\Python314\Lib\site-packages\robocop\config_init
.py", line 1, in
from robocop.config.manager import ConfigManager
File "d:\Python\Python314\Lib\site-packages\robocop\config\manager.py", line 10, in
from robocop.cache import RobocopCache
ImportError: cannot import name 'RobocopCache' from partially initialized module 'robocop.cache' (most likely due to a circular import) (d:\Python\Python314\Lib\site-packages\robocop\cache.py)
DEBUG:robotcode.language_server.common.parts.diagnostics.DiagnosticsProtocolPart:End collect workspace diagnostic for 1 documents took 0.0042 seconds

Windows: WIN32_NT 10.0.26200.7840
Python: 3.14
robocop: 8.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions