(Python 3.6.4) Open File Error | بلاگ

(Python 3.6.4) Open File Error

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I tried opening this file with Python IDLE 3.6.4 using these:

open("F:/Users/Bituin/Desktop/Python/!Ref2.txt")
open("F:UsersBituinDesktopPython!Ref2.txt")
open("F:\UsersBituinDesktopPython\!Ref2.txt")
open(r"F:UsersBituinDesktopPython!Ref2.txt")
open("F://Users/Bituin/Desktop/Python//!Ref2.txt")

List of errors

1-1: open("F:/Users/Bituin/Desktop/Python/!Ref2.txt") <_io.TextIOWrapper name='F:/Users/Bituin/Desktop/Python/!Ref2.txt' mode='r' encoding='cp1252'>

1-2: open("F:UsersBituinDesktopPython!Ref2.txt") SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated UXXXXXXXX escape

1-3: open("F:UsersBituinDesktopPython!Ref2.txt")

1-4: open(r"F:UsersBituinDesktopPython!Ref2.txt") <_io.TextIOWrapper name='F:UsersBituinDesktopPython!Ref2.txt' mode='r' encoding='cp1252'>

(note: 1-3 & 1-4 share the same error)

1-5 open("F://Users/Bituin/Desktop/Python//!Ref2.txt") <_io.TextIOWrapper name='F://Users/Bituin/Desktop/Python//!Ref2.txt' mode='r' encoding='cp1252'>

asked 53 secs ago
Baventhiran

...
نویسنده : استخدام کار بازدید : 17 تاريخ : جمعه 24 فروردين 1397 ساعت: 8:51