Issue with running huskyMcpChat.py
Ton.Van 2025-12-20 15:48:46 141 Views0 Replies Hello Everyone,
I am experiencing some issues while running the huskyMcpChat.py script from the HuskyLens2MCP repository.
My Setup
OS: Windows 10 Pro, 64-bit
Python Version: 3.12.0
HuskyLens 2 Firmware: 1.2.1
Configuration: I have correctly updated my GEMINI_API_KEY and set the SERVER_URL to my local IP (http://192.168.1.9:3000).
The Problem: Although the connection to the HuskyLens MCP is successful, I encountered two specific errors during testing:
Switch Command Error: When I try to switch the algorithm using switch Face Recognition, I receive the following error response:"error" : "unsupported command set_algorithm"
JSON/Data Processing Error: When using the ask command, the script fails with a JSON type error:[json.exception.type_error.302] type must be string, but is null
Consequently, Gemini receives invalid data and cannot process the request.
Log Output:
Connecting to SSE at http://192.168.1.9:3000...
✅ Connected to HuskyLens MCP.
...
User > switch Face Recognition
🔄 Switching to 'Face Recognition'...
✅ {
"cmd" : "set_algorithm",
"correlation_id" : "req_8_1261922470226",
"error" : "unsupported command set_algorithm",
"ret" : "error"
}
User > ask is TON around?
👀 Asking Huskylens2...
📄 Raw Data:
[json.exception.type_error.302] type must be string, but is null
🧠 Processing with Gemini...
🤖 AI ANSWER: The provided sensor data is an error message, not valid JSON.
Questions:
Is the set_algorithm command supported in firmware version 1.2.1?
What could be causing the type_error.302 (null string) when fetching data from the lens?
Are there any specific settings on the HuskyLens unit itself that I need to enable?
I would greatly appreciate any guidance or fix for these issues. Thank you very much for your help!

