-
Notifications
You must be signed in to change notification settings - Fork 61
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
Failed to generate HTML report: UnicodeDecodeError: 'ascii' codec can't decode byte
#273
Comments
Having the same problem, installed yesterday, using conda for python=3.7 and then pip-install cellbender. |
Hey Yossi! Huh, I will try to replicate this myself. I probably need to pin a version of something that’s had a recent update. Very likely nbconvert |
@asherkhb-ktx thanks for reporting this. While I figure out the fix, if you wanted to, you could try to generate the report manually. All you need to do is open the Jupyter notebook in this repository
and manually modify the names of the input and output files and run the notebook. This is how the report gets generated (and it then gets converted to html). |
Hm, so far I am not able to reproduce this. I am on a Mac, and if I do (base) $ conda create -n test python=3.7
(base) $ conda activate test
(test) $ pip install cellbender and then run this on the (test) $ cellbender remove-background --input tiny_raw_feature_bc_matrix.h5ad --output test.h5 then I do get an HTML report:
If I run (test) $ pip list I see
What do you see? |
( instead of this CellBender/cellbender/remove_background/report.py Lines 59 to 60 in 4990df7
|
Hi sjfleming. I also encountered this issue, which showed a warning or an error: cellbender:remove-background: Unable to create report.
cellbender:remove-background: Traceback (most recent call last):
File "/home/zhangminghe/project/miniconda3/envs/cellbender/lib/python3.7/site-packages/cellbender/remove_background/run.py", line 351, in compute_output_denoised_counts_reports_metrics
output=html_report_file,
File "/home/zhangminghe/project/miniconda3/envs/cellbender/lib/python3.7/site-packages/cellbender/remove_background/report.py", line 82, in run_notebook_make_html
title=('CellBender: ' + os.path.basename(output).replace('_report.html', '')),
File "/home/zhangminghe/project/miniconda3/envs/cellbender/lib/python3.7/site-packages/cellbender/remove_background/report.py", line 60, in _postprocess_html
html = f.read()
File "/home/zhangminghe/project/miniconda3/envs/cellbender/lib/python3.7/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xee in position 232667: ordinal not in range(128) However, I have a file named ‘tHCC15_cellbender_output_report.html’ in the output. This HTML file also contains information about the process. So, does this warning merely indicate that some characters cannot be encoded correctly, without affecting the overall report output? Thank you! |
Hi @ZhangMH2000 , yes, if you have When the error you're seeing occurs, the only difference will be that you will probably see a different title when you look at the label on the tab. I will fix this eventually though! @ZhangMH2000 do you know if you have non-ascii characters in the name of your file? |
Hm, or maybe the non-ascii characters could be part of feature names, I suppose |
Hi @sjfleming , the title of |
Thanks @ZhangMH2000 , good to know |
Running Cellbender 0.3.0 it reports "Unable to create report" with the following Traceback,
"pip install" did yield two Errors, which may be related but didn't seem to interfere elsewhere:
The text was updated successfully, but these errors were encountered: