mitmproxy-node
mitmproxy-node copied to clipboard
No module named 'websockets'
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?
The example repo is here, and the error is in the README
Resovled by venv, fix PR here https://github.com/nleak/mitmproxy-test-local/pull/1