From 3b0e64caff50ad5cef02b4e74642165a0a62375f Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Mon, 23 May 2011 22:08:34 +0000 Subject: Open pickles in binary mode. --- JKTwitterBot/src/thebot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/JKTwitterBot/src/thebot.py b/JKTwitterBot/src/thebot.py index cae309d..8eafaca 100644 --- a/JKTwitterBot/src/thebot.py +++ b/JKTwitterBot/src/thebot.py @@ -188,13 +188,13 @@ if __name__ == '__main__': domain='api.twitter.com') "All files need to be the same length as public_Status_update_File" - with open(public_Status_update_File, 'r') as f: + with open(public_Status_update_File, 'rb') as f: tweet = pickle.load(f) - with open(questions_status_update_File, 'r') as f: + with open(questions_status_update_File, 'rb') as f: question = pickle.load(f) - with open(Response_File, 'r') as f: + with open(Response_File, 'rb') as f: response = pickle.load(f) - with open(make_Friends_File, 'r') as f: + with open(make_Friends_File, 'rb') as f: friends = pickle.load(f) # Prepare Eliza (code from the_shrink.py) -- cgit v1.2.3