FileNotFoundError: [Errno 2] No such file or directory:

  • Posted February 18, 2018
  • Django

i have installed django on windows7. created a virtual env, from i tried to open a xlsx file which is saved in my local drive.

log Message:
File "C:\Users\AnsariMo\Envs\my_django_environment\lib\site-packages\xlrd\", line 116, in open_workbook
  with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\serverPgm\\django_test\\chipIdInfo\\xml_files\\V16120.xlsx'

can you please help me to solve it. running from virtual env, when i am running own python script to open the xls file, able to open/read successfully but from virtaul env , i am not able to open/read it.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To get rid of this error you can try using os.listdir() function to check that at least python sees the file exists or not.