Skip to content

AttributeError: 'str' object has no attribute 'get' #4591

@schorlton-bugseq

Description

@schorlton-bugseq

Thanks for your hard work on this tool! Running v8.4.0 via official docker image:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/megalinter/MegaLinter.py", line 51, in run_linters
    linter.run(run_commands_before_linters=False, run_commands_after_linters=False)
  File "/megalinter/Linter.py", line 819, in run
    pre_post_factory.run_linter_pre_commands(
  File "/megalinter/pre_post_factory.py", line 48, in run_linter_pre_commands
    return run_commands(
           ^^^^^^^^^^^^^
  File "/megalinter/pre_post_factory.py", line 97, in run_commands
    pre_command_result = run_command(command_info, log_key, mega_linter, linter)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/megalinter/pre_post_factory.py", line 105, in run_command
    if command_info.get("cwd", "root") == "workspace":
       ^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'
"""

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

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/megalinter/run.py", line 14, in <module>
    linter.run()
  File "/megalinter/MegaLinter.py", line 252, in run
    self.process_linters_parallel(active_linters, linters_do_fixes)
  File "/megalinter/MegaLinter.py", line 391, in process_linters_parallel
    updated_linters = pool_result.get()
                      ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 774, in get
    raise self._value
AttributeError: 'str' object has no attribute 'get'

Any ideas? v8.1.0 was the last version I was on and the same repo worked. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions