Skip to content

Commit

Permalink
Merge pull request nltk#1649 from jmhutch/develop
Browse files Browse the repository at this point in the history
fixes 'requres str not bytes' error when writing ps file
  • Loading branch information
stevenbird authored Apr 13, 2017
2 parents 9370fa3 + 7ea10e1 commit 9ec8a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nltk/draw/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ def print_to_file(self, filename=None):
pagex=0, pagey=0)
# workaround for bug in Tk font handling
postscript = postscript.replace(' 0 scalefont ', ' 9 scalefont ')
with open(filename, 'w') as f:
with open(filename, 'wb') as f:
f.write(postscript.encode('utf8'))

def scrollregion(self):
Expand Down

0 comments on commit 9ec8a68

Please sign in to comment.