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

Old Headless mode has been removed from the Chrome binary #124

Open
alex-dr opened this issue Jan 17, 2025 · 2 comments
Open

Old Headless mode has been removed from the Chrome binary #124

alex-dr opened this issue Jan 17, 2025 · 2 comments

Comments

@alex-dr
Copy link

alex-dr commented Jan 17, 2025

My Chrome updated today (Ubuntu 24.04) and now dfi.export is broken with the following error:

CalledProcessError: Command '['--enable-logging', '--disable-gpu', '--headless=old', '--crash-dumps-dir=/home/alex/.dataframe_image/tmpykuuxx_z', '--force-device-scale-factor=3.0', '--window-size=1400,900', '--hide-scrollbars', '--screenshot=/home/alex/.dataframe_image/tmpykuuxx_z/temp.png', '/home/alex/.dataframe_image/tmpykuuxx_z/temp.html']' returned non-zero exit status 1.

When using table_conversion="html2image" it works, and I also see a warning:

Old Headless mode has been removed from the Chrome binary. Please use the new Headless mode 
(https://developer.chrome.com/docs/chromium/new-headless) or the chrome-headless-shell which 
is a standalone implementation of the old Headless mode (https://developer.chrome.com/blog/chrome-headless-shell).

"chrome" also works if I provide a chrome_path pointed at the chrome-headless-shell.

@PaleNeutron
Copy link
Collaborator

PaleNeutron commented Jan 18, 2025

I have set --headless='new' but reverse this change for some reason I forget. See commit 951e99c and #115

@PaleNeutron
Copy link
Collaborator

OK, I found why we need '--headless=old', see test

def test_huge_df(document_name, converter, dpi):
df = pd.DataFrame(np.random.randint(0, 100, size=(300, 20)))
df.dfi.export(
f"tests/test_output/{document_name}.png",
table_conversion=converter,
dpi=dpi,
max_rows=-1,
)

If use new headless or html2image package, only 25 lines will be exported.

PaleNeutron added a commit that referenced this issue Jan 22, 2025
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