PcbDraw icon indicating copy to clipboard operation
PcbDraw copied to clipboard

None of '['preferences']' didn't appear within timeout.

Open MarcelRobitaille opened this issue 4 months ago • 0 comments

I am trying to create a 3D render of my PCB.

python -m venv venv --system-site-packages
source venv/bin/activate
pip install kikit mistune==2.0.5 PcbDraw==1.1.2
venv/bin/pcbdraw render ./<project>.kicad_pcb /tmp/test.png
Traceback (most recent call last):
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 358, in startPcbnewSession
    yield session
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 521, in renderBoard
    with session.start3DViewer() as viewer:
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 206, in start3DViewer
    session.waitForResponsiveness()
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 232, in waitForResponsiveness
    prefId = self._parent.waitForWindow("Preferences")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 99, in waitForWindow
    return self.waitForWindows([titlePattern], timeout, callback)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 117, in waitForWindows
    raise TimeoutError(f"None of '{titlePatterns}' didn't appear within timeout. Available windows:\n{windows_list}")
TimeoutError: None of '['preferences']' didn't appear within timeout. Available windows:
- pcbnew
- <project> — PCB Editor
- 3D Viewer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/ui.py", line 301, in render
    images = renderBoard(input, plan, baseResolution=(baseresolution, baseresolution),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 520, in renderBoard
    with startPcbnewSession(resolution=baseResolution, board=boardFile, adjustConfig=updateConfig) as session:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/renderer.py", line 360, in startPcbnewSession
    raise GuiPuppetError(str(e), e, display.grab())
pcbdraw.renderer.GuiPuppetError: None of '['preferences']' didn't appear within timeout. Available windows:
- pcbnew
- <project> — PCB Editor
- 3D Viewer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<project>/venv/bin/pcbdraw", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<project>/venv/lib/python3.12/site-packages/pcbdraw/ui.py", line 309, in render
    raise RuntimeError(f"The following GUI error ocurred{img_save_msg}:\n{e}")
RuntimeError: The following GUI error ocurred:
None of '['preferences']' didn't appear within timeout. Available windows:
- pcbnew
- <project> — PCB Editor
- 3D Viewer

kicad version info:

Application: KiCad PCB Editor x86_64 on x86_64

Version: 8.0.5, release build

Libraries:
	wxWidgets 3.2.6
	FreeType 2.13.3
	HarfBuzz 9.0.0
	FontConfig 2.15.0
	libcurl/8.10.0 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0 nghttp3/1.5.0

Platform: Arch Linux, 64 bit, Little endian, wxGTK, X11, KDE, x11
OpenGL: Intel, Mesa Intel(R) Arc(tm) A770 Graphics (DG2), 4.6 (Compatibility Profile) Mesa 24.2.2-arch1.1

Build Info:
	Date: Sep 10 2024 12:58:22
	wxWidgets: 3.2.6 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.86.0
	OCC: 7.8.1
	Curl: 8.9.1
	ngspice: 43
	Compiler: GCC 14.2.1 with C++ ABI 1019

Build settings:
	KICAD_USE_EGL=ON

MarcelRobitaille avatar Oct 04 '24 11:10 MarcelRobitaille