Hi there, I am trying to write a plugin with the 9.0 new API, and I am able to try my logic from Window command, that is, KiCad.get_board() works fine from outside the PCB editor. However it does not work from within the PCB editor. And I tried it from the KiPython console and got below error stack.
What could be wrong there? I’ve checked that “Enable KiCad API” box from preferences->Plugins. My KiCad version is 9.0.5
>>> from kipy import KiCad
>>> board = KiCad().get_board()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "D:\Program Files\KiCad\9.0\bin\Lib\site-packages\kipy\kicad.py", line 225, in get_board
docs = self.get_open_documents(DocumentType.DOCTYPE_PCB)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\KiCad\9.0\bin\Lib\site-packages\kipy\kicad.py", line 216, in get_open_documents
response = self._client.send(command, commands.GetOpenDocumentsResponse)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\KiCad\9.0\bin\Lib\site-packages\kipy\client.py", line 72, in send
raise ConnectionError(f"Error receiving reply from KiCad: {e}") from None
kipy.errors.ConnectionError: Error receiving reply from KiCad: Timed out