79226951

Date: 2024-11-26 13:46:17
Score: 1
Natty:
Report link

I had a similar issue and found an easy fix.

I am using pandas to read an excel file in the same folder as my python file. When running my file from cmd prompt, everything works great. When I ran the file from VS Code it would always say FileNotFound.

The Fix: In VS Code, use the file explorer and ensure you are in the folder containing your file and NOT a step or two higher in the file hierarchy. I had a "Python Projects" folder open and the files for this specific project were in a subfolder...when I navigated to just the subfolder specific to my project in VS code using "open folder", it fixed the issue.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: TimTheEnchanter