Hence, make sure you have the files closed before trying to access them via your python code and make sure that on a windows computer no Microsoft office applications are using your file when you’re trying to open() or read() it. This happens because these applications do not let any other application modify a file when used via them. When a particular file is opened in Microsoft excel or Microsoft word, this error frequently pops up. We’ll look at all these methods in depth one by one. Using a try and except block to find out where the error arises.The file that we’re trying to open shouldn’t be opened somewhere else. ![]() The path of the file must be specified without any errors such as a forward slash. ![]()
0 Comments
Leave a Reply. |