ERROR: [Errno 22] Invalid argument:
Method 1: Incorrect input format
f = open('F:\Python 3.6\test.txt','r')
It should be modified to:
f = open('f:\\Python 3.6\\test.txt','r')
Or:
f = open('f:/Python 3.6/test.txt','r')
Change \ to /, or \\, because \t is a newline character in Python and is not recognized.
Method two :(I made a mistake here)
It is best to enter the path manually rather than copy and paste the changes directly.
Read More:
- Solve the oserror: [errno 22] invalid argument: ‘u202ad’ in Python
- Error reported in Python reading file oserror: [errno 22] invalid argument: ‘u202ac: \ \ users \ \ yyqhk \ \ desktop \ \ 1. CSV’
- Python TypeError: ‘newline’ is an invalid keyword argument for this function
- OS error reported by Python: [errno 22] invalid argument
- About VMware: vmw_ ioctl_ Command error invalid argument. Solution
- Python-OSError: [Errno 22]
- unzip error 22 – Invalid argument
- Python reports oserror: initializing from file failed
- Runtime error 5 Invalid procedure call or argument
- Python failed to use PIL writer library. TTF, etc. oserror: cannot open resource
- How to solve oserror: [errno 98] address already in use and kill the python3 process
- RuntimeError:cuda runtime error (11) : invalid argument at /pytorch/aten/src/THC/generic
- An import error is reported in the python. The solution to setting. Pylintrc is invalid
- Python about error: invalid command ‘bdist_ The solution of wheel error report
- [C + +] G + + compiler class template error message: template argument 1 is invalid
- python got an unexpected keyword argument
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- The problem of nativelink error couldn’t execute invalid argument occurs when starting Modelsim Altera simulation through quartus
- Python about typeerror: required argument ‘mat’ (POS 2) not found error resolution