Plantoidz / mechanical-garden-FA

Multimodal mechanical plantoid garden repository.
3 stars 3 forks source link

Try/except block so the program doesn't crash if the network has a problem #42

Open benrito opened 7 months ago

benrito commented 7 months ago

Traceback (most recent call last): File "/Users/benmoskowitz/llm/mechanical-garden-FA/mechanical_garden.py", line 63, in run_program() File "/Users/benmoskowitz/llm/mechanical-garden-FA/mechanical_garden.py", line 18, in run_program interaction_manager.run_interaction() File "/Users/benmoskowitz/llm/mechanical-garden-FA/context/interaction_manager.py", line 319, in run_interaction self.start_interaction( File "/Users/benmoskowitz/llm/mechanical-garden-FA/context/interaction_manager.py", line 291, in start_interaction name, message = simulator.step() ^^^^^^^^^^^^^^^^ File "/Users/benmoskowitz/llm/mechanical-garden-FA/interaction_modes/interaction.py", line 79, in step message = speaker.listen_for_speech(self.agents, self._step) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/benmoskowitz/llm/mechanical-garden-FA/plantoid_agents/dialogue_agent.py", line 116, in listen_for_speech user_message = self.listen_module.listen(agents, step=step) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/benmoskowitz/llm/mechanical-garden-FA/plantoid_agents/events/listen.py", line 413, in listen if(character.callback): character.callback("") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/benmoskowitz/llm/mechanical-garden-FA/plantoid_agents/dialogue_agent.py", line 76, in tunnel_wifi if(self.socket): self.socket.sendto(bytes(val, 'utf-8'), (self.addr, 666)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [Errno 65] No route to host (base) benmoskowitz@Bens-MacBook-Pro-2 mechanical-garden-FA %