I have two quasi-identical scripts that write features to csv files. Script A runs fine, script B gives an Error 111. The only difference between the two scripts is that script A has slightly shorter feature names to write. But then again, script B sometimes does run fine. Just not most of the time.

I have another script that is 9 times as long, and writes feature names that are just as long if not longer, and this script never crashes.

I find these random errors to be weird and frankly rather trying, particularly given that the error message is completely generic.