2
I finally figured out why my loop kept crashing after 47 tries
Last Tuesday my beginner Python script kept dying when I tried to open a CSV file with weird characters in it. Turns out I was reading the file as UTF-8 when it was actually in some Windows legacy encoding. Took me 2 hours of print statements and staring at the error until my buddy said "just try latin-1." Worked instantly. Now I always check the encoding first. Anyone else get stuck on file encoding stuff when they started?
0 comments
Log in to join the discussion
Log In0 Comments
No comments yet
Be the first to share your thoughts on this discussion.