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

Broken on 3.7.x #127

Open
egh opened this issue Sep 5, 2023 · 1 comment
Open

Broken on 3.7.x #127

egh opened this issue Sep 5, 2023 · 1 comment

Comments

@egh
Copy link

egh commented Sep 5, 2023

../../.cache/pypoetry/virtualenvs/framey-KJJC3bmX-py3.7/lib/python3.7/site-packages/html2image/html2image.py:16: in <module>
    from html2image.browsers import chrome, chrome_cdp, edge  # , firefox, firefox_cdp
E     File "<fstring>", line 1
E       (r.json()=)
E                ^
E   SyntaxError: invalid syntax
egh added a commit to egh/framey that referenced this issue Sep 6, 2023
@pxpwoa
Copy link

pxpwoa commented Sep 27, 2023

in centos system
comment code about "chrome_cdp, edge" of html2image.py works for me:


from html2image.browsers import chrome # , chrome_cdp, edge  # , firefox, firefox_cdp

browser_map = {
    'chrome': chrome.ChromeHeadless,
    'chromium': chrome.ChromeHeadless,
    'google-chrome': chrome.ChromeHeadless,
    'googlechrome': chrome.ChromeHeadless,
    # 'edge': edge.EdgeHeadless,
    # 'chrome-cdp': chrome_cdp.ChromeCDP,
    # 'chromium-cdp': chrome_cdp.ChromeCDP,
    # 'firefox': firefox.FirefoxHeadless,
    # 'mozilla-firefox': firefox.FirefoxHeadless,
    # 'firefox-cdp': firefox_cdp.FirefoxCDP,
}

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