No such file or directory error

后端 未结 6 1706
有刺的猬
有刺的猬 2021-01-13 13:20

This is the error I am getting:

Traceback (most recent call last):
  File \"E:\\stuff\\module.py\", line 91, in 
    f = open(\'E:/stuff/log.tx         


        
6条回答
  •  难免孤独
    2021-01-13 13:41

    Define you path names using os.path.join()

    root="E:\\"
    mylog = os.path.join(root,"stuff","log.txt") # or log.txt.txt as seen in your dir output
    f = open(mylog)
    ...
    f.close()
    

提交回复
热议问题