screeninfo icon indicating copy to clipboard operation
screeninfo copied to clipboard

"No enumerators available" - on macOS

Open yash1th opened this issue 4 years ago • 7 comments

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)

yash1th avatar Mar 24 '20 01:03 yash1th

Also with:

  • Windows 10
  • Python 3.7.3
  • screeninfo version - 0.6.3

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

feerrenrut avatar Apr 10 '20 11:04 feerrenrut

@feerrenrut This is a separate issue.

rr- avatar Apr 10 '20 13:04 rr-

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.

feerrenrut avatar Apr 11 '20 09:04 feerrenrut

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

This ticket is about tracking macOS platform problem.

rr- avatar Apr 11 '20 09:04 rr-

Thanks, released as 0.6.4 on PyPI

rr- avatar Apr 15 '20 07:04 rr-

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

zac-garby avatar Oct 21 '20 22:10 zac-garby

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

rr- avatar Dec 27 '20 20:12 rr-