Open stormyweathers opened 1 year ago
I have the same problem.
I am not currently able to reproduce this issue, could you provide the following ?
chrome://version/
)I just experienced this myself. I can provide the html and chrome version.
chrome version: 114.0.5735.199 (Official Build) (64-bit) (cohort: Stable Installs & Version Pins) html:
<head><meta` http-equiv="refresh" content="1"></head><center><h2>今日の予約</h2><table border="1" class="dataframe">
<thead>
<tr style="text-align: center;">
<th></th>
<th>小</th>
<th>大</th>
<th>答なし</th>
<th>✖</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td></td>
<td></td>
<td>山田太郎</td>
<td></td>
</tr>
<tr>
<th>2</th>
<td></td>
<td></td>
<td>浅川良太</td>
<td></td>
</tr>
<tr>
<th>3</th>
<td></td>
<td></td>
<td>鈴木亜美</td>
<td></td>
</tr>
<tr>
<th>4</th>
<td></td>
<td></td>
<td>鹿見葛城</td>
<td></td>
</tr>
</tbody>
</table></center>
*These names are all made up for testing purposes. No personal/private data here.
Expected output should be something like this:
Actual output looks like this:
Hi @fkkjohn.
I got the same error, and after I read this comment from @vgalin, I could notice that this could be just a permission problem.
Actually I am using the lib as above, and it is working fine to me.
htm = Html2Image(
custom_flags=[
'--no-sandbox'
'--remote-allow-origins=*',
'--hide-scrollbars'
],
temp_path=f'{getcwd()}/.tmp'
)
Thank you, Paulo. I read the link you sent, but I'm not running Ubuntu on this computer. It's Windows 10. It could still be a permission problem as you suggest, so I'll have a look. However, I've since moved on to a different solution, so it's not a priority for me at the moment.
Either way, thank you very much for the reply.
I am getting the same, have tried putting in a background color via css but still the same. Windows and Chrome Version 116.0.5845.141 (Official Build) (64-bit)
UPDATE: The default bg color is 000000 worked after changing the default:
hti = Html2Image(
custom_flags=['--default-background-color=FFFFFF', '--hide-scrollbars']
)
Hey there,
Im using
V2.0.3
with python3.8.3
I can't get the basic functionality to work on my machine. It works if I fetch an html page from the web, but not from local sources.
This example works fine
but if I download the webpage locally, and try it again
it fails.
I've tried with simpler examples, and html strings as well. All local sources give just a blank black image.