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

No module named 'websockets' #15

Open
foreseaz opened this issue Sep 25, 2022 · 2 comments
Open

No module named 'websockets' #15

foreseaz opened this issue Sep 25, 2022 · 2 comments

Comments

@foreseaz
Copy link

Hi, I'm running the following test script

import MITMProxy from 'mitmproxy';

async function main() {
  const interceptPaths = [
    '/eval'
  ]
  const mitmProxy = await MITMProxy.default.Create(undefined, interceptPaths, false);
}

main();

Got error:

MITMProxy not running; starting up mitmproxy.
Loading script /Users/.../mitmproxy-test-local/node_modules/mitmproxy/scripts/proxy.py
in script /Users/.../mitmproxy-test-local/node_modules/mitmproxy/scripts/proxy.py: No module named 'websockets'

Under env:

  • node: v16.14.2
  • python: 3.10.6
  • Mitmproxy: 8.1.1
  • Platform: Mac M1, macOS-12.4-arm64-arm-64bit

I've been stuck for a whole day and it's the critical dependency for my project, could you please give some instructions on this issue?

@foreseaz
Copy link
Author

The example repo is here, and the error is in the README

@foreseaz
Copy link
Author

Resovled by venv, fix PR here nleak/mitmproxy-test-local#1

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

1 participant