Browse Source

workaround for pyinstaller on win32

tags/v0.3.8
Felix Lohmeier 1 year ago
parent
commit
7b657eb76e
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      refine.py

+ 5
- 1
refine.py 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()

Loading…
Cancel
Save