adamerose / PandasGUI

A GUI for Pandas DataFrames
MIT No Attribution
3.15k stars 226 forks source link

UnicodeEncodeError: 'charmap' codec can't encode character '\u25c4' in position 276395 #218

Closed robertschulze closed 1 year ago

robertschulze commented 1 year ago

Describe the bug
Trying to execute the website example

import pandas as pd
from pandasgui import show
df = pd.DataFrame({'a':[1,2,3], 'b':[4,5,6], 'c':[7,8,9]})
show(df)

I am given the error "UnicodeEncodeError: 'charmap' codec can't encode character '\u25c4' in position 276395". Others appear to have the same issue, cf. StackOverflow.

Environment OS: Windows 10 Python: 3.9.15, confirmed in 3.10.8 IDE: PyDev

Package versions

ipython @ file:///C:/Windows/TEMP/abs_45b5zb1l7q/croots/recipe/ipython_1659529855872/work
ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work
jupyter-server @ file:///C:/b/abs_1cfi3__jl8/croot/jupyter_server_1671707636383/work
jupyter_client @ file:///C:/ci/jupyter_client_1661836943389/work
jupyter_core @ file:///C:/b/abs_84df679bho/croot/jupyter_core_1672332237650/work
jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work
jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1655961217661/work
notebook @ file:///C:/b/abs_ca13hqvuzw/croot/notebook_1668179888546/work
notebook_shim @ file:///C:/b/abs_ebfczttg6x/croot/notebook-shim_1668160590914/work
pandasgui==0.2.13
plotly==5.13.0
PyQt5-sip @ file:///C:/Windows/Temp/abs_d7gmd2jg8i/croots/recipe/pyqt-split_1659273064801/work/pyqt_sip
wonka929 commented 1 year ago

Same here. I think it's just a matter of adding the encoding = "utf-8" at every read in the code.

robertschulze commented 1 year ago

Hi wonka929, Could you contribute a pull request?

adamerose commented 1 year ago

Was actually a problem with the figure view Plotly tempfile, not related to Pandas. Fixed in 0.2.14

robertschulze commented 1 year ago

Thanks!