AI Player

by ob_105

Adds an autonomous AI player that uses LM Studio/Open ai to play Factorio. The AI can build, mine, craft, fight, and interact with the world.

Utilities
a month ago
2.0
593
Logistics Combat Character Enemies Logistic network Manufacturing

b Error in the Bridge

18 days ago

Hi All,

Wonder if anyone can help me, i keep getting an error back from the bridge

[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte

So date is fed into the LM studio and the data that comes back then generates the above error.. i think this does not feed back into the AI in factorio, and i am assuming this is in python that is generating the error

Can anyone help or tell me where to look to find out more details on this

18 days ago

Better trace of error

[19:09:56] Sending to LM Studio at 19:09:56
[19:11:57] LM Studio raw response: {"id": "chatcmpl-zt9xquu7an91og0vbq49uf", "object": "chat.completion", "created": 1769972998, "model": "qwen/qwen3-vl-4b", "choices": [{"index": 0, "message": {"role": "assistant", "content": "[{\"action\": \"craft\", \"item\": \"stone-furnace\", \"count\": 1}, {\"action\": \"place\", \"item\": \"stone-furnace\", \"position\": {\"x\": -50, \"y\": -103}, \"direction\": \"north\"}]", "tool_calls": []}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 3058, "completion_tokens": 63, "total_tokens": 3121}, "stats": {}, "system_fingerprint": "qwen/qwen3-vl-4b"}...
[19:11:57] AI Response content: [{"action": "craft", "item": "stone-furnace", "count": 1}, {"action": "place", "item": "stone-furnace", "position": {"x": -50, "y": -103}, "direction": "north"}]
[19:11:57] Sending to Factorio via RCON: /ai-response 60|[{"action": "craft", "item": "stone-furnace", "count": 1}, {"action": "place", "item": "stone-furnace", "position": {"x": -50, "y": -103}, "direction": "north"}]...
[19:11:57] RCON result: None
[19:11:57] Response sent successfully
[19:11:57] Request 60 completed
[19:11:57] Request 60 deleted from disk
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[Bridge] Error: Unexpected error: 'utf-8' codec can't decode bytes in position 8034-8035: invalid continuation byte
[19:12:01] Processing request 61...
[19:12:01] Request payload: {"model": "qwen3-vl-4b", "messages": [{"role": "system", "content": "You are an AI playing Factorio. You control a character in the game world.\n\nYour goal is to survive, gather resources, build a factory, and automate production.\n\nYou receive information about your surroundings and status, and you must respond with actions to take.\n\nIMPORTANT: Use todo lists to organize your goals! Create a ...
[19:12:01] Sending to LM Studio at 19:12:01

i wonder if its the position move that is generating the error

New response