When I import my own module with VsCode, it says No name in module ... for some reason

If you import a module from a folder directly under the program with Pylint installed, an error will be displayed on VsCode for some reason. Since it is Import from the folder directly under it, the execution itself works without problems.

Solution

Create an empty init.py in the folder that contains the module.

$ touch ./modules/__init__.py

I wonder if I can't find it without \ _ \ _ init__.py.

Recommended Posts

When I import my own module with VsCode, it says No name in module ... for some reason
I couldn't import the python module with VSCODE, but I could do it on jupyterlab, so I searched for the cause (2)
I get "sanity check" and "No module" errors in import numpy
A memo for when pip3 is installed with python2.7 for some reason
When lambda-uploader says No module named xxxx.
To import your own module with jupyter
Import Error in Python3: No module named'xxxxx'
I tried to publish my own module so that I can pip install it
When I name the file flask.py in Flask, I get Import Error: cannot import name'Flask'