You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Seems a bug for the layout for the Chinese Character #52
You can assign this issue to me, I believe I am working on a solution.
The problem is due to which version of Unicode is used by wcwidth, may be different from the version supported by your Terminal Emulator. The next version of wcwidth will support all versions of Unicode, and the version used by wcwidth (and tabulate) will be selected by an environment variable.
And so the solution is to only select the correct version. I am also working on a CLI utility, wcwidth-detect, which will automatically determine it.
I thought this was a unicode version issue, which I am working on a good solution for. But, there is no issue for me to reproduce here, at least on a Mac, using the version of wcwidth and tabulate published on pypi. Which is the same versions reported here.
I have tried iTerm2.app, Terminal.app, and XTerm version 326 on MacOS/XQuartz, pictured here. I will try a few terminal emulators on Linux next.
@sidkang can you check if you have wcwidth at all installed (pip freeze | grep wcwidth)? It is an optional dependency, so python-tabulate would work happily without it, but the wide character alignment would be off. For example, my output with and without wcwidth:
@jquast@dricetar Hi, thanks for your kind reply. Sorry for not test the issue throughly. Just Checked the code in the terminal. Everything works perfectly. The Error only occurred in the Jupiter lab environment. So this could be a Jupiter side issue?
(My Jupyterlab version is 2.1.3 which is freshly installed.
By the way what happened the first time the issue appeared after installing wcwidth, is you probably needed to restart your Jupyter kernel, you always need to do that when you install/upgrade packages that have already been imported
there is a kind of refresh button in the GUI for it,
but anyway it happened naturally when you stepped away for the day :) glad your issue is resolved
Activity
dricetar commentedon Apr 27, 2020
same issue
jquast commentedon May 30, 2020
You can assign this issue to me, I believe I am working on a solution.
The problem is due to which version of Unicode is used by wcwidth, may be different from the version supported by your Terminal Emulator. The next version of wcwidth will support all versions of Unicode, and the version used by wcwidth (and tabulate) will be selected by an environment variable.
And so the solution is to only select the correct version. I am also working on a CLI utility,
wcwidth-detect, which will automatically determine it.jquast commentedon May 31, 2020
I thought this was a unicode version issue, which I am working on a good solution for. But, there is no issue for me to reproduce here, at least on a Mac, using the version of
wcwidthandtabulatepublished on pypi. Which is the same versions reported here.I have tried
iTerm2.app,Terminal.app, andXTermversion 326 on MacOS/XQuartz, pictured here. I will try a few terminal emulators on Linux next.gfrlv commentedon May 31, 2020
@sidkang can you check if you have wcwidth at all installed (

pip freeze | grep wcwidth)? It is an optional dependency, so python-tabulate would work happily without it, but the wide character alignment would be off. For example, my output with and without wcwidth:sidkang commentedon Jun 1, 2020
@jquast @dricetar Hi, thanks for your kind reply. Sorry for not test the issue throughly. Just Checked the code in the terminal. Everything works perfectly. The Error only occurred in the Jupiter lab environment. So this could be a Jupiter side issue?

(My Jupyterlab version is 2.1.3 which is freshly installed.
jquast commentedon Jun 2, 2020
@sidkang: maybe you have multiple python environments, from your Juperlab, are you able to successfully
import wcwidth? if not, trybest wishes
sidkang commentedon Jun 2, 2020
Just checked the wcwidth package. Seems it is working properly.
jquast commentedon Jun 2, 2020
By the way what happened the first time the issue appeared after installing wcwidth, is you probably needed to restart your Jupyter kernel, you always need to do that when you install/upgrade packages that have already been imported
there is a kind of refresh button in the GUI for it,
but anyway it happened naturally when you stepped away for the day :) glad your issue is resolved
best wishes
astanin commentedon Feb 17, 2021
This issue seems to be fixed now:
This was fixed in pull request #58