bug on macos
Describe the bug First I had an issue with pip installing Pillow==10.3.0 requirement. Would you please tell me what version of python/pip you're using ? (I am using python==3.13.0 and pip 24.2) I successfully installed the latest version though Pillow==11.0.0 I am using anaconda3 with a conda env called tb-autoclick.
Second, after following the instructions of adding terminal to accessibility and input monitoring, I get this exception when I run the code: python main.py:
Not on windows. win10toast not imported. Exception in thread Thread-2: Traceback (most recent call last): File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/threading.py", line 1041, in _bootstrap_inner self.run() ~~~~~~~~^^ File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/pynput/_util/init.py", line 211, in run self._run() ~~~~~~~~~^^ File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/pynput/keyboard/_darwin.py", line 274, in _run super(Listener, self)._run() ~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/pynput/_util/darwin.py", line 207, in _run self.IS_TRUSTED = HIServices.AXIsProcessTrusted() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/objc/_lazyimport.py", line 193, in getattr value = get_constant(name) File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/objc/_lazyimport.py", line 361, in get_constant funcmap.pop(name) ~~~~~~~~~~~^^^^^^ KeyError: 'AXIsProcessTrusted' Unhandled exception in listener callback Traceback (most recent call last): File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/pynput/_util/init.py", line 229, in inner return f(self, *args, **kwargs) File "/opt/anaconda3/envs/tb-autoclick/lib/python3.13/site-packages/pynput/_util/darwin.py", line 283, in _handler self._handle(proxy, event_type, event, refcon) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: '_thread._ThreadHandle' object is not callable
The OS Macos Ventura 13.6.7
Hi, I got this while testing too, it's because you need to add terminal to accessibility and input monitoring settings in system preferences to allow mouse and keyboard inputs. For Python I use the latest version, Pillow too, but 11.0.0 can work too (It's just to import the button icons)
Miss click
I GET THIS WHEN I RUN THE LAST CODE "python3 main.py"
agabus@MacBook-Pro src % python3 main.py
Traceback (most recent call last):
File "/Users/agabus/Desktop/Mouse/src/main.py", line 1, in
I dont know what am doing wrong. The code ends here and nothing happens. I dont have the app too...Please help. Thanks
You need to to pip install -r requirements.txt or pip3 install -r requirements.txt
If you already did this, run pip install requests or pip3 install requests
Maybe related: https://pynput.readthedocs.io/en/latest/limitations.html#macos