workaround for pyinstaller on win32

This commit is contained in:
Felix Lohmeier 2019-08-22 03:02:32 +02:00
parent d22022e273
commit 7b657eb76e
1 changed files with 5 additions and 1 deletions

View File

@ -22,10 +22,14 @@ import sys
from google.refine import __main__, cli, refine
# workaround für pyinstaller
# workaround for pyinstaller
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
reload(sys)
sys.setdefaultencoding('utf-8')
if sys.platform == "win32":
import codecs
codecs.register(lambda name: codecs.lookup(
'utf-8') if name == 'cp65001' else None)
if __name__ == '__main__':
__main__.main()