asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.45k stars 1.26k forks source link

TypeError: 'numpy._DTypeMeta' object is not subscriptable #804

Open Giannisdotexe opened 1 year ago

Giannisdotexe commented 1 year ago

Hello, I'm trying to use pyautogui but I run into the above problem. Merely importing pyautogui will make this error show up without using any of pyautogui's functions. Keep in mind that my pip version is up to date

samik3301 commented 1 year ago

Can you kindly provide some code to replicate the error or a screenshot? https://stackoverflow.com/questions/68916893/typeerror-numpy-dtypemeta-object-is-not-subscriptable @Giannisdotexe

kskmy commented 1 year ago

I got same error after installing opencv. I attached the screen shot of that below. For my case, it showed because of opencv and numpy. It was resolved by upgrading numpy. https://stackoverflow.com/questions/76879942/how-to-prevent-error-message-when-importing-import-cv2

image