3

Why does this error appear in the playwright file?

ImportError: DLL load failed while importing _greenlet: The specified module could not be found.

Here is my code:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chrome.launch()
    page = browser.new_page()
    page.goto("https://www.youtube.com/watch?v=FK_5SQPq6nY&list=PLYDwWPRvXB8_W56h2C1z5zrlnAlvqpJ6A&index=1")
    page.screenshot(path="demo.png")
    browser.close()
albob
  • 31
  • 3

2 Answers2

4

It seems to be an issue of missing dependecies brought on by a version change.

I was able to get it working by installing msvc-runtime.

pip install msvc-runtime

You may need to install it in your general libraries and not inside of a virtualenv.

gloomyfit
  • 475
  • 1
  • 5
  • 13
1

The issue is from greenlet version, change greenlet version to 1.1.2. I have changed and it workes

Hrayr
  • 11
  • 1