Reputation: 1
I am facing this problem while my "from src.simulation.simulator import Simulator" is in the same directory. what should i do now to resolve this problem?
I have tried to solve this problem but did not understand what to do!!
Upvotes: 0
Views: 373
Reputation: 9209
Since you haven't updated for a long time, I have made a guess.
This maybe caused by vscode using workspace as root floder.
This will lead to a problem. When you use the os.getcwd()
method in the deep directory of the workspace, you will still get the workspace directory.
You can open your settings and search Python > Terminal: Execute In File Dir then check it.
You can also use debug mode and add the following to your launch.json:
"cwd": "${fileDirname}"
Upvotes: 0