rr- / screeninfo

Fetch location and size of physical screens.
Other
208 stars 36 forks source link

"No enumerators available" - on macOS #27

Open yash1th opened 4 years ago

yash1th commented 4 years ago

I am getting the below error when ran on macOS

>>> from screeninfo import get_monitors
>>> get_monitors()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/yash/workspace/projects/unsplash-wallpaper/lib/python3.7/site-packages/screeninfo/screeninfo.py", line 37, in get_monitors
    raise ScreenInfoError("No enumerators available")
screeninfo.common.ScreenInfoError: No enumerators available

python version - 3.7.7 screeninfo version - 0.6.1 macOS catalina version - 10.15.3 (19D76)

feerrenrut commented 4 years ago

Also with:

The exception being raised in get_monitors is

Procedure probably called with not enough arguments (4 bytes missing)

This is coming from the EnumDisplayMonitors call in enumerators\windows

rr- commented 4 years ago

@feerrenrut This is a separate issue.

feerrenrut commented 4 years ago

The error from screeninfo is exactly the same screeninfo.common.ScreenInfoError: No enumerators available

Perhaps what this shows is that the granularity of the error conidtion reporting is not correct.

I did some investigation (included in my previous comment) to work out what the real error is.

rr- commented 4 years ago

Improving granularity is yet another ticket. Please mark it as such.

This ticket is about tracking macOS platform problem.

rr- commented 4 years ago

Thanks, released as 0.6.4 on PyPI

zac-garby commented 4 years ago

I'm still getting this issue on the latest macOS, screeninfo 0.6.5.

rr- commented 3 years ago

Released a new version that addresses another iteration of this issue as 0.6.7.