sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59535
[Question #819319]: The command "import pysikuli as sik" doesn't work. Error report: "TypeError: 'Window' object is not subscriptable"
New question #819319 on SikuliX:
https://answers.launchpad.net/sikuli/+question/819319
I'm trying to get Sikuli running on a Raspberry Pi 5. Operating system is Raspberry Pi OS. Python Version is 3.11.2.
I ran the commands:
python3 -m venv .venv
source .venv/bin/activate
pip install pysikuli
After that, I started python in the terminal and ran the command:
import pysikuli as sik
This led to the error message (last line):
TypeError: 'Window' object is not subscriptable
Full message:
>>> import pysikuli as sik
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ich/.venv/lib/python3.11/site-packages/pysikuli/__init__.py", line 11, in <module>
from ._config import Button, config
File "/home/ich/.venv/lib/python3.11/site-packages/pysikuli/_config.py", line 245, in <module>
config = Config()
^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pysikuli/_config.py", line 73, in __init__
self.MONITOR_REGION = self._platformModule.getMonitorRegion()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pysikuli/_unix.py", line 109, in getMonitorRegion
return tuple(int(x) for x in pmc.getPrimary().box)
^^^^^^^^^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pymonctl/_main.py", line 105, in getPrimary
return _getPrimary()
^^^^^^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pymonctl/_pymonctl_linux.py", line 117, in _getPrimary
return LinuxMonitor()
^^^^^^^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pymonctl/_pymonctl_linux.py", line 227, in __init__
monitorData = _XgetMonitorData(handle)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pymonctl/_pymonctl_linux.py", line 1004, in _XgetMonitorData
for monitorData in _XgetAllMonitors():
^^^^^^^^^^^^^^^^^^
File "/home/ich/.venv/lib/python3.11/site-packages/pymonctl/_pymonctl_linux.py", line 885, in _XgetAllMonitors
display: Xlib.display.Display = rootData[0]
~~~~~~~~^^^
TypeError: 'Window' object is not subscriptable
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.