0

I feel like I am overlooking something simple here. I am trying to import from another python file a simple db and class but am getting "unresolved import 'main'". The py files are in the exact same directory so as far as my limited knowledge is concerned it should be working. Could anyone help me with what I am overlooking? I don't quite understand why this simple import is not working. Attached is a screen shot

Any help is greatly appreciated. Thank you!

enter image description here

Maurice Meyer
  • 17,279
  • 4
  • 30
  • 47
mharre
  • 233
  • 3
  • 17
  • Does [this](https://stackoverflow.com/questions/53939751/pylint-unresolved-import-error-in-visual-studio-code) answer Your question? – Matiiss Apr 05 '21 at 17:26
  • Thank you, I did see this while googling before deciding to post my own question but the biggest difference between my issues and this one is that this user seems to have an unresolved import error for every single import. All imports from other libs work flawlessly for me. But I will have to try some of these and see if it works for me haha – mharre Apr 05 '21 at 17:31
  • If anyone comes across this issue I seemed to have found out a way to make it work. I am unsure of the exact reason why this simple import doesn't work, but based on googling and other threads, I believe it is some sort of issue with VS code improperly creating a "workspace". What solved my issue was opening the command prompt (or terminal), cd'ing into my project folder and then opening the folder with: code . – mharre Apr 05 '21 at 17:40

0 Answers0