[英]FileNotFoundError: [Errno 2] No such file or directory but there is a file
fhand=open('mbox.txt')
mbox.txt 文件在我的桌面上,但 python shell 找不到它。 這就是回溯。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'mbox.txt'
導航到保存這兩個文件的文件夾(使用cd
)(即,它們應該在同一目錄中)並從終端運行程序。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.