Skip to content

verify.py with rflint fails due to missing module 'imp' on newer python version  #44

@sjsarsa

Description

@sjsarsa

On Python versions 3.12 or 3.13, running verification on exercises that use rflint fail.
For example, python verify.py 07 gives the following output:

.../rf-katas$ python verify.py 07
Traceback (most recent call last):
  File "/home/myprofile/.pyenv/versions/3.12.7/bin/rflint", line 5, in <module>
    from rflint.__main__ import main
  File "/home/myprofile/.pyenv/versions/3.12.7/lib/python3.12/site-packages/rflint/__init__.py", line 1, in <module>
    from .rflint import RfLint, ERROR, WARNING
  File "/home/myprofile/.pyenv/versions/3.12.7/lib/python3.12/site-packages/rflint/rflint.py", line 25, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
Linting failed, check the results, fix and run again

Related rflint issue: boakley/robotframework-lint#95.
The rflint issue is a year old, so it might not be fixed anytime soon even though there is an easy fix in the comments.

It would be nice if the materials would take this at least into account somehow, for example mention support for Python versions only up to 3.11 or provide instructions on how to circumvent the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions