View Single Post
Old 06-28-2013, 08:21 PM   #9
jsambrook
Junior Member
jsambrook began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Asus DR-9[05]0
I've been having the same problem with crontab, the nub being:

File "<string>", line 356, in main
File "<string>", line 192, in prints
TypeError: encode() argument 1 must be string, not None

If after:

enc = getattr(f, 'encoding', 'utf-8')

I add:

if enc == None:
enc = "utf-8"

then all is well.

Presumeably this means that the stdout/stdout.buffer is defining an 'encoding' attribute, but it's set to None?
jsambrook is offline   Reply With Quote