sfu-db / dataprep

Open-source low code data preparation library in python. Collect, clean and visualization your data in python with a few lines of code.
http://dataprep.ai
MIT License
2.07k stars 206 forks source link

UnicodeEncodeError when calling create_report #300

Open vitamins opened 4 years ago

vitamins commented 4 years ago

To Reproduce python:

df = pd.read_csv("https://www.openml.org/data/get_csv/1595261/phpMawTba", na_values = [' ?'])
>>> report = create_report(df)
Report has been created!: 100%|████████████████████████████████████████████████████████| 73/73 [00:12<00:00,  5.84it/s]
>>> report.show_browser()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Lukas\AppData\Local\Programs\Python\Python38\lib\site-packages\dataprep\eda\create_report\io.py", line 74, in show_browser
    file.write(self.report)
  File "C:\Users\Lukas\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 957167: character maps to <undefined>

Desktop:

Garett-MacGowan commented 4 years ago

Hey, just wondering if there is an ETA on this. Thanks a lot.

jinglinpeng commented 4 years ago

Hi @vitamins and @Garett-MacGowan , thanks for the bug report. We currently mainly focus on Jupyter Notebook environment. The terminal and Windows Powershell has not been tested. We will try to fix this ASAP. Before that, you could try dataprep in Notebook to avoid the issue.

ssenathi commented 3 years ago

I have the same issue in JupyterLab on Windows 10 ( Anaconda Distribution)

image

ssenathi commented 3 years ago

Same as the Powershell. Using the sample code from documentation

image

jinglinpeng commented 3 years ago

Hi @vitamins , @Garett-MacGowan and @ssenathi . Thanks for reporting! We have fixed the encoding issue in Windows and it will be released in the next version. For now, you could try the develop branch by pip install git+https://github.com/sfu-db/dataprep.git@develop.

The support on terminal is still under fix. For now please try notebook :)

bacoco commented 3 years ago

Hello, How to install it will conda but without git installed ? Thanks