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

imp library no longer supported in python 3.12 #95

Open
GeekStewie opened this issue Oct 20, 2023 · 4 comments · May be fixed by #96
Open

imp library no longer supported in python 3.12 #95

GeekStewie opened this issue Oct 20, 2023 · 4 comments · May be fixed by #96

Comments

@GeekStewie
Copy link

https://docs.python.org/3.11/library/imp.html

Get this error when attempting to run robot scripts when 3.12 is installed.

Error: Cannot load Python class for task:
No module named 'imp'

@jamescze
Copy link

jamescze commented May 30, 2024

Hello,

do you have any information regarding to this issue? It is merged or not?

I am confused, since I have this issue on latest python and library (Windows 11, VS Code)

Thank you for any kind of help :)

image

@jamescze
Copy link

jamescze commented Jun 5, 2024

Any help, advice for my issue (see my previous post)...??

@darol81
Copy link

darol81 commented Nov 28, 2024

I had same problem with rflint.py and was able to fix it. Here are the instructions how I fixed my problem. Hopefully this helps someone to fix theirs. Edit rflint.py in the directory where it complains about it, then make the following changes. Old line commented out, new one inserted. In my rflint.py there was only one appearance of both lines that needed to be replaced. See below:

# import imp; 
from importlib.machinery import SourceFileLoader
# imp.load_source(name, filename)
SourceFileLoader(name, filename).load_module()

Let's hope this helps :)

@bhirsz
Copy link

bhirsz commented Dec 7, 2024

.. Or you can use robocop for linting :) (shameless plug as I have been browsing through some issues and end up there)

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.

4 participants