attempted fix to 343 using 185's solution
encoding fixes; seems to solve #343 (import needed too...)
Merge pull request #343 from keflavich/issue343

Attribute Error: 'bytes' object has no attribute 'encode'