Post

PythonPython

H
Harish Harsh

Posted on 24th April 2024|3192 views

0
votes

Oserror Errno 22 Invalid Argument

How to resolve the error called OSError [Errno 22] invalid argument when use open() in python?

Answers
P
James ROBERT

Posted on 24th April 2024

Check the pat address you must give the full path address like this

open(r"C:\doc_files\program_doc.txt", "r")

Or give the relative path

open("program_doc.txt","r")

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos