20๐
I had this exact same issue the way you described, and it started happening only recently (CI failed Oct 3, 2022 but worked fine Sep 25, 2022, with no related changes in between).
What ended up being the cause was the fact that in my CI, importlib-metadata
started installing version 5.0.0
, which gave the error (Worked fine with 4.12.0
).
To fix it for now, I just added importlib-metadata==4.13.0
to my environment.yml
file, after which the issue was solved.
4๐
https://github.com/python/importlib_metadata/issues/411
Downgrade importlib-metadata to 4.13.0.
- Django python 'sql_server.pyodbc' isn't an available database backend
- How can I send e-mail from django using the google smtp server?
0๐
A shorten Answer:
Your problem here is that youโve named a submodule (aka a python file)
or a package (aka a folder) with the same name of the package that you want to import celery
therefore you need to change the name of this file in order to import the correct package.
More details:
Python importing module checks the packages name in the paths specified ordered in sys.path
. So if you printed
print(sys.path)
You will get a list of paths at where the interpreter will start to search for the package name in the same order, and the first path is your current directory path so once it finds it in your current working directory it will import it and wouldnโt continue searching.
for more details you can read the documentation from here
0๐
Install it by placing your cursor on red underline and then select install pkg or press alt+shift+enter
- JSON data convert to the django model
- Django โ model unicode() show foreignkey object attribute
- Warnings (or even info messages) instead of only errors in Django
- What is the difference between syncdb and migrate?
- Django Sessions are not maintaing in an iframe