Thursday, September 29, 2011

Python BufferedIOBase Error

Just had a problem with a Python script where it was mysteriously generating an error on a simple import gzip statement.

The problem turned out to be someone had created a directory named 'io' in the PYTHONPATH. This caused python to import from that directory instead of importing the builtin library io.

Silly programmers! Don't you know Trix are for kids! Never create a directory named the same as a builtin library! Ug! I'll be changing this dir name as soon as practicable (gotta negotiate with the rest of the code to make sure it isn't a depended-upon bug).
Post a Comment