Skip to content

python command is stuck #302

@chen982

Description

@chen982

When I following the steps in the video fully, It is stuck when I run python3 test.py. Is there something to do with my Https and Http VPN export?

export HTTP and HTTPS VPN
curl -sSL https://get.microsandbox.dev | sh
source ~/.bashrc
msb pull microsandbox/python
pip install microsandbox
msb server start --detach
msb server keygen --expire 1mo
export MSB_API_KEY=msb_xxx
python3 test.py

The test.py is:

import asyncio
from microsandbox import PythonSandbox

async def main():
    async with PythonSandbox.create(name="test") as sb:
        exec = await sb.run("name = 'Python'")
        exec = await sb.run("print(f'Hello {name}!')")

    print(await exec.output()) # prints Hello Python!

asyncio.run(main())

For more infomation, it is stuck at Starting sandboxes and no print message return:
msb server start
✓ Start sandbox server ✓ Server listening on 127.0.0.1:5555
✓ Starting sandboxes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions