Import "xxx.msg" could not be resolved
I am facing this error constantly when i ran vscode. Sometimes, it is happening however such as there is no problem running clearly. I looked for but I haven't found any answer yet. As far as i see, this problem can be caused 2 way. Firstly, Interpreter selection, secondly and in my opinion ROS extencion doesn't work clearly. Because sometimes i am closing the vscode and i am running again like this problem is solving such as temporarly. Please Help Me !
For instance:
import rospy, cv2, cv_bridge, numpy # (cv_bridge and the file that msgs couldn't be resolved)
from sensor_msgs.msg import Image
from geometry_msgs.msg import Twist
The output of the program is as follows:
Import "sensor_msgs.msg" could not be resolvedPylancereportMissingImports
I guess i invent new thing. If i include the my workspace folder again, ros extension can define the .msg's but if i continue from where we left off, for the folder has been opened before, ros extension can't define the files. The problem has been solved as temporarly not real solve.