Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Output shows serious error #660

Closed
richlysakowski opened this issue Apr 19, 2022 · 1 comment
Closed

HTML Output shows serious error #660

richlysakowski opened this issue Apr 19, 2022 · 1 comment

Comments

@richlysakowski
Copy link

richlysakowski commented Apr 19, 2022

I get only an error whenever I try to render an HTML report of a DTale object view in a webpage.

I expect an HTML tabular report.

Please provide guidance for how to configure DTale so this does not happen.

Thank you.

There is no dtale.version() attribute so I cannot report that easily. I used the hack in bug report #653 and it shows version 2.2.0

Here's my platform and environment information:

Working Directory: c:\0_Sapio_Data\00_All_Source_Files\2022.04.18-Sapio-Data-Exports-for-Treatments
Virtual Environment: C:\ProgramData\Anaconda3\envs\data_migration
Runtime Interpreter: C:\ProgramData\Anaconda3\envs\data_migration\python.exe
Python Version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 05:59:45) [MSC v.1929 64 bit (AMD64)]
OS Platform: win32
Current CPU: Intel64 Family 6 Model 126 Stepping 5, GenuineIntel, with ('64bit', 'WindowsPE')
Windows version: 10.0.19044

{
"error": "'charmap' codec can't decode byte 0x8d in position 187964: character maps to ",
"success": false,
"traceback": "Traceback (most recent call last):\n File "C:\ProgramData\Anaconda3\envs\data_migration\lib\site-packages\dtale\views.py", line 121, in _handle_exceptions\n return func(*args, **kwargs)\n File "C:\ProgramData\Anaconda3\envs\data_migration\lib\site-packages\dtale\views.py", line 2523, in get_data\n return export_html(data_id, return_data)\n File "C:\ProgramData\Anaconda3\envs\data_migration\lib\site-packages\dtale\views.py", line 2560, in export_html\n main_styles = load_file("css/main.css", encoding=None).split("\n")\n File "C:\ProgramData\Anaconda3\envs\data_migration\lib\site-packages\dtale\views.py", line 2530, in load_file\n return read_file(\n File "C:\ProgramData\Anaconda3\envs\data_migration\lib\site-packages\dtale\utils.py", line 795, in read_file\n output = file.read()\n File "C:\ProgramData\Anaconda3\envs\data_migration\lib\encodings\cp1252.py", line 23, in decode\n return codecs.charmap_decode(input,self.errors,decoding_table)[0]\nUnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 187964: character maps to \n"
}

@aschonfeld
Copy link
Collaborator

I see you're running on windows. Try this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants