PyMacroRecord icon indicating copy to clipboard operation
PyMacroRecord copied to clipboard

bug on macos

Open mfhossam1992 opened this issue 1 year ago • 5 comments

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

mfhossam1992 avatar Oct 26 '24 15:10 mfhossam1992

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)

LOUDO56 avatar Oct 27 '24 10:10 LOUDO56

Miss click

LOUDO56 avatar Oct 27 '24 10:10 LOUDO56

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 from windows import MainApp File "/Users/agabus/Desktop/Mouse/src/windows/init.py", line 1, in from .main import * File "/Users/agabus/Desktop/Mouse/src/windows/main/init.py", line 1, in from .main_app import * File "/Users/agabus/Desktop/Mouse/src/windows/main/main_app.py", line 5, in from utils.not_windows import NotWindows File "/Users/agabus/Desktop/Mouse/src/utils/init.py", line 1, in from .version import Version File "/Users/agabus/Desktop/Mouse/src/utils/version.py", line 1, in import requests ModuleNotFoundError: No module named 'requests' agabus@MacBook-Pro src %

I dont know what am doing wrong. The code ends here and nothing happens. I dont have the app too...Please help. Thanks

AgabusBrains avatar Oct 28 '24 08:10 AgabusBrains

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

LOUDO56 avatar Oct 30 '24 17:10 LOUDO56

Maybe related: https://pynput.readthedocs.io/en/latest/limitations.html#macos

superstes avatar Nov 21 '24 18:11 superstes