summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jfr_playoff/db.py3
-rw-r--r--playoff.spec2
2 files changed, 4 insertions, 1 deletions
diff --git a/jfr_playoff/db.py b/jfr_playoff/db.py
index ad32ac8..f7efc7c 100644
--- a/jfr_playoff/db.py
+++ b/jfr_playoff/db.py
@@ -1,4 +1,5 @@
import mysql.connector
+import sys
class PlayoffDB(object):
@@ -6,6 +7,8 @@ class PlayoffDB(object):
db_cursor = None
def __init__(self, settings):
+ reload(sys)
+ sys.setdefaultencoding("latin1")
self.database = mysql.connector.connect(
user=settings['user'],
password=settings['pass'],
diff --git a/playoff.spec b/playoff.spec
index 7246d59..6b0906e 100644
--- a/playoff.spec
+++ b/playoff.spec
@@ -1,7 +1,7 @@
import os
a = Analysis(['playoff.py'],
pathex=[os.path.abspath('.')],
- hiddenimports=[],
+ hiddenimports=['mysql.connector.locales.eng.client_error'],
hookspath=None,
runtime_hooks=None,
excludes=None)