Skip to content

[Question]: When my code run to sync_playwright(), then will hang all the time. #1549

Description

@cnkailyn

Your question

I write a script named test.py like this:

from playwright.sync_api import sync_playwright
print("a")
with sync_playwright() as p:
    print("b")
    my_other_business_code()

then I put this script to centos7 with python 3.9.0, and excute python3.9 test.py, it will print:

a
b

that is all right, But when I excute pm2 start 'python3.9 test.py', then it will just print a and being hang all the time.
I debug into sync_playwright(), find the finally hang code is dispatcher_fiber.switch():

I guss this could be the pm2 ENV caused, but I do not know the really reason, and do not know how to resolve this problem.

Do any one have a solution? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions