Evidlo / remarkable_mouse

use your reMarkable as a graphics tablet
GNU General Public License v3.0
506 stars 48 forks source link

get_monitors() list index out of range #91

Open Evidlo opened 7 hours ago

Evidlo commented 7 hours ago

Hello, On Arch here, Manjaro to be precise, and i've got a similar issue. I've dug as much as I could and this issue is the most simmilar.

I get this error where screen selector doesnt' seem to work. I've checked that my Python and my config is up to date. Manually re-installed all the python libraries needed. Running out of ideas any help would be great as I believe this to be a great project.

    ~/Downloads  remouse --debug                                                               ✔ 
Password for '10.11.99.1': 
connected to 10.11.99.1
Debugging enabled...
Chose monitor: Monitor(x=0, y=0, width=1920, height=1200, width_mm=302, height_mm=189, name='eDP-1', is_primary=True)
1
1
^C%                                                                                                        ~/Downloads  remouse --debug --monitor 1                                           ✔  14s  
Password for '10.11.99.1': 
connected to 10.11.99.1
Debugging enabled...
Traceback (most recent call last):
  File "/usr/bin/remouse", line 33, in <module>
    sys.exit(load_entry_point('remarkable-mouse==5.2.1', 'console_scripts', 'remouse')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/remarkable_mouse/remarkable_mouse.py", line 119, in main
    read_tablet(args, remote_device)
  File "/usr/lib/python3.12/site-packages/remarkable_mouse/pynput.py", line 70, in read_tablet
    monitor = get_monitors()[args.monitor]
              ~~~~~~~~~~~~~~^^^^^^^^^^^^^^
IndexError: list index out of range
    ~/Downloads                                                                              1 ✘ 

_Originally posted by @Hellunteur in https://github.com/Evidlo/remarkable_mouse/issues/56#issuecomment-2355733718_

Evidlo commented 7 hours ago

Have you tried with --monitor 0, or just not specifying the monitor at all?