From b60c23d6cf553a0a1b6e81e019a6d07fe5931f1b Mon Sep 17 00:00:00 2001 From: Sharath Chalya nagaraju Date: Wed, 29 Mar 2017 21:53:09 -0500 Subject: [PATCH] Update csv2libsvm.py _csv.Error: iterator should return strings, not bytes error was coming in python 3 since the file was opened in binary mode. Hence removing the binary mode. --- csv2libsvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csv2libsvm.py b/csv2libsvm.py index 414b964..39870dc 100644 --- a/csv2libsvm.py +++ b/csv2libsvm.py @@ -41,8 +41,8 @@ def construct_line( label, line ): except IndexError: skip_headers = 0 -i = open( input_file, 'rb' ) -o = open( output_file, 'wb' ) +i = open( input_file, 'r' ) +o = open( output_file, 'w' ) reader = csv.reader( i )