Skip to content

How to own the file descriptor when feeding file into python3.wasm? #10

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

Closed
Yifei-yang7 opened this issue Mar 5, 2023 · 2 comments
Closed

Comments

@Yifei-yang7
Copy link

Yifei-yang7 commented Mar 5, 2023

python/cpython#96005 reports a bug which gives[Errno 76] Capabilities insufficient. Currently what I can do is to put my python script under 'opt/wasi-python/lib/python3.12/test/' and open from that. The bug report said it's because the process needs to own the file descriptor, is there a way to make my file works then?

@Yifei-yang7 Yifei-yang7 changed the title Can wasmtime feed .pyc into the wasm-compiled interpreter? How to own the file descriptor when feeding file into python3.wasm? Mar 5, 2023
@kesmit13
Copy link
Collaborator

kesmit13 commented Mar 5, 2023

Is this simply a matter of the fact that Python can't compile the file into the __pycache__ directory? You can disable this behavior bad adding the -B options to your Python options.

@Yifei-yang7
Copy link
Author

I realized that this is also relevant to file directory mapping, which is addressed in #9, thanks!

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