I am trying to make a tool for my day job to help track budgets for the various projects I work on. I work at a small civil engineering firm, so we have limited options when it comes to this. Long story short, I parse though everyone's time sheet file (text files) and add time billed to a dictionary that keeps track of how much total time has been billed to a project.
My tool does what I want, for the most part. The trouble I have is when certain dashes show up in the text file godot skips the entire line and spits out "unicode error: invalid skip". I have tried multiple ways of getting around this, but have hit dead ends each way. There are hundreds of these text files, so changing the files manually is out of the question.
My last idea would be to go through the text files byte by byte and hope that godot only skips the character and not the entire line, but that would require some real effort on my part to get working and I don't even know if that would work. I was hoping someone on here would be able to point me in a better direction. If I understand things correctly version 4.0 of the engine may take care of this issue? If so, then maybe my best bet would be to wait for the alpha to come out and try again.
I know this is outlier case, since most people would probably not hit this issue. Appreciate any help with the matter. If it helps, here is how my tool works:
- Open the directory where all employee time sheets are saved
- Load the first file
- Go through the file line by line and look for lines that start with a certain keyword <-- this is where the issue happens (file.get_line() will give the error if the line has an unknown character, most likely an "em" dash)
- If a line starts with the keyword then store the data from that line
- Once the end of file is reached close it and open the next file
- Repeat 1-5 for all files in the directory.
Running Godot 3.2.3 stable on windows
Thanks!