I'm using VSCode and getting warning "search is not accessed in Pylance" when trying to import my own module, search is the name of the module I need to import to my main program
1- I do have __init__.py
file on module folder
2- Tried changing interpreter
Importing mymodule as below:
from src import search
folder structure:
Could the reason of this be that 'src' is being treated as a module instead of a folder?
Is there an alternative way to import my modules?
Thanks
CodePudding user response:
The error "search" is not accessed
means you are not using search
,
If you use search
below then this error will go away.