[chronojump] Fixed importer bug utf-8 on python3 when using debug mode



commit d5eb037b1c9497bed27c49c953f35b999d18cc6b
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Nov 24 15:29:29 2021 +0100

    Fixed importer bug utf-8 on python3 when using debug mode
    
    https://stackoverflow.com/questions/65057326/python-3-can-only-concatenate-str-not-bytes-to-str

 src/chronojump-importer/chronojump_importer.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/chronojump-importer/chronojump_importer.py b/src/chronojump-importer/chronojump_importer.py
index 104b92318..0cf3eff13 100755
--- a/src/chronojump-importer/chronojump_importer.py
+++ b/src/chronojump-importer/chronojump_importer.py
@@ -937,7 +937,7 @@ class ImportSession:
             session_id = row.get("sessionID")
 
             if(DEBUGTOFILE):
-                debugFile.write("original_filename: " + original_filename.encode('utf-8') + "\n")
+                debugFile.write("original_filename: " + original_filename + "\n")
 
             # Prepares the new filename and destination_url
             filename = ""
@@ -954,7 +954,7 @@ class ImportSession:
             row.set("url", destination_url)
 
             if(DEBUGTOFILE):
-                debugFile.write("filename: " + filename.encode('utf-8') + "\n")
+                debugFile.write("filename: " + filename + "\n")
 
             # Copies the files to the new place
             destination_directory = os.path.join(self.destination_path, "..", "..", destination_url)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]