python - Splitting database throwing errno 9 bad file descriptor with CON file -


I have done some research and what I can say with this is usually when a file is closed before it closes Goes off?

But for whatever he is doing, he does not understand.

This is my code:

  import csv dicto = {} name = Open to the line in the reader (input ("here here filepath here", "r" ): Reader = csv.reader (mainfile) as main file: name = line [8] .lstrip ("'") name = Name.lstrip ("\ xa0") name1 = name name = name.upper () If not named [: 3] In Dico: Dicto [Name [: 3]] = [Name [: 3] + ".JS", 0] Open (Dicto [Name [: 3]] [0], "W" ) As file 1: # problem line file is 1. Write ("Tags = ["] Other: Dict [Name [: 3]] [1] = = If name [: 1] == "#": file In form of Print (name) with open (disco [name [: 3]] [0], "a"): if dicto [name [: 3]] [1] & gt; file2.write ('various spam') other : File2.write ('Different Eggs') for dcto.keys () in the key: Open3 (with Dico [Key] [0], "A") as file3: file3.write ("\ n;); ")   

I am running through a large database and it is divided into JS files which are named after the first three letters of the data label. First running (There are 44k entries to go in Not, so it takes a few seconds to finish). Altogether, I currently have 309 files, although no one has been completed. However, an error occurs once for the combo "Q":

  Traceback (most recent call final): File "C: \ User \ Sarbiki \ Documents \ Code \ Python \ School \ school .py ", line 16, & lt; Module & gt; File 1: Open in the form of OSERR (Dikto [Name [: 3]] [0], "W") with: [Ern 9] Bad file descriptor: 'Conn. JS '  

and shut down the program. Is there any reason why this would have happened?


Edit: Solution (or lack thereof) Some other people will have to replace the names of files in windows with something else.

answering yourself

CON is the reserved name for files with windows Some others will therefore need to be replaced with something else. .

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -