From 2b0ed7daacfb7bac88af522fe637eb0c1a364cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 19 Jun 2020 16:29:29 +0200 Subject: [PATCH] Fix broken ui command in tutor binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "tutor ui" was failing miserably, printing a lot of garbled characters in the shell. In fact, a FileNotFound error was being raised and automatically caught by the ui command. When removing the catch all, this was the error that was raised: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIimsqmq/wcwidth/version.json' │ This is resolved on SO: https://stackoverflow.com/questions/62155242/pyinstaller-cant-find-wcwidth-version-json-when-running-executable --- CHANGELOG.md | 4 ++++ tutor.spec | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d2ff07..8db1fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Note: Breaking changes between versions are indicated by "💥". +## Unreleased + +- [Bugfix] Fix broken `tutor ui` command in binary + ## v10.0.3 (2020-06-19) - [Bugfix] Fix error on android user creation diff --git a/tutor.spec b/tutor.spec index cd362c0..d02198c 100644 --- a/tutor.spec +++ b/tutor.spec @@ -2,12 +2,16 @@ import importlib import os import pkg_resources +import wcwidth block_cipher = None datas = [("./tutor/templates", "./tutor/templates")] hidden_imports = [] +# Fix missing wcwidth/version.json file +datas.append((os.path.dirname(wcwidth.__file__), 'wcwidth')) + # Auto-discover plugins and include patches & templates folders for entrypoint in pkg_resources.iter_entry_points("tutor.plugin.v0"): plugin_name = entrypoint.name