Comments (5)
What's the version of OS X you have? (The specific version, like Mavericks 10.0.4 or such.)
from pyautogui.
Yosemite version 10.10.1
from pyautogui.
Related, not sure if you'd like a separate issue for this: On Mac 10.9.5 with a retina display 1440 x 900, I get screenshot()
sizes that are exactly twice as large as expected. This appears to carry through to the locate()
family of functions, and return coordinates that are off by a factor of 2.
>>>> pyautogui.screenshot()
<PIL.PngImagePlugin.PngImageFile image mode=RGB size=2880x1800 at 0x106CFCF80>
from pyautogui.
I ran a tracer to follow the interpretation of pyautogui and apparently it gets stuck here:
pyautogui/__init__.py:122 line return platformModule._size()
platformModule being pyautogui._pyautogui_osx I looked into it and the _size() method makes use of Quartz.CGDisplayPixelsWide(0). Tracing that function gave me this:
Quartz/__init__.py:79 return mod.QuickLookUI = m
... return value: None
Quartz/__init__.py:83 return _load()
... return value: None
Looking at the init file, m is supposed to be QuickLookUI, also in the Quartz folder. I can't tell why the return value is None.
from pyautogui.
I also experienced the same issue (MacBook Pro 10.10.3 (Retina, 13-inch, Late 2013)). Though I remedied the issue by replace 0 with Quartz.CGMainDisplayID() in the _size function. Further investigation is required to determine why exactly this issue arose in the first place.
def _size():
return Quartz.CGDisplayPixelsWide(Quartz.CGMainDisplayID()), Quartz.CGDisplayPixelsHigh(Quartz.CGMainDisplayID())
from pyautogui.
Related Issues (20)
- Image File Not Found Exception... HOT 5
- trying to use it in the text editor HOT 2
- pyautogui.moveTo() HOT 1
- Is this possible to use locateOnScreen against captured image file instead of screen image? HOT 1
- pyautogui.typewrite replaces '<' with '>' HOT 3
- N/A HOT 1
- pyautogui fails to recognize special characters such as "á, é, í, ó and ú"
- How to check if .typewrite() failed or read the text you tried to insert?
- failed
- screenshot "region" type verification
- Enter key not being recognized by web page
- `locateAllOnScreen` raises `pyscreeze.ImageNotFoundException` HOT 1
- Typing doesn't work on different keyboard layouts HOT 2
- with pyautogui.hold(alt'): problem HOT 2
- AttributeError: module 'pyscreeze' has no attribute 'locateOnWindow'
- pyautogui does not work as windows service HOT 1
- Has this repository been abandoned?
- [Bug] pyautogui.write('%...') writes '5...'
- Problems with hotkey
- Same image, different colors,How to distinguish
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyautogui.