"no enumerators available" on Linux MInt 20.1
Hi,
I've been trying to get this obs plugin to work: https://github.com/tryptech/obs-zoom-and-follow
I've installed screeninfo today from pypi, using pip3, with the --user option.
But after including the script into obs, and then starting up obs, it gives me the following message on Linux Mint 20.1 Xfce:
[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "/home/username/.config/obs-studio/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 19, in <module>
[zoom_and_follow_mouse.py] class CursorWindow:
[zoom_and_follow_mouse.py] File "/home/username/.config/obs-studio/scripts/obs-zoom-and-follow-master/zoom_and_follow_mouse.py", line 26, in CursorWindow
[zoom_and_follow_mouse.py] d_w = get_monitors()[monitor_idx].width
[zoom_and_follow_mouse.py] File "/home/username/.local/lib/python3.8/site-packages/screeninfo/screeninfo.py", line 37, in get_monitors
[zoom_and_follow_mouse.py] raise ScreenInfoError("No enumerators available")
[zoom_and_follow_mouse.py] screeninfo.common.ScreenInfoError: No enumerators available
I'm having two monitors attached, configured from the Xfce settings. Please let me know which information you would need to help fix the problem.
I, too, am having this problem. Same OBS plugin, Linux Mint 20.1 Cinnamon, Python 3.8.5.
Can you please post the output of the following commands?
python3 -m screeninfo xrandr
and
python3 -m screeninfo xinerama
I'm using Mint with MATE and it's working fine for me
Sure, thanks for your help!
The outputs are:
(xrandr)
Monitor(x=0, y=0, width=1920, height=1200, width_mm=518, height_mm=324, name='DP-1')
Monitor(x=1920, y=161, width=1680, height=1050, width_mm=474, height_mm=296, name='HDMI-2')
(xinerama)
Monitor(x=0, y=0, width=1920, height=1200, width_mm=None, height_mm=None, name=None)
Monitor(x=1920, y=161, width=1680, height=1050, width_mm=None, height_mm=None, name=None)
That's very weird. I expected one of them to fail. What about two more commands?
python3 -m screeninfo
and
python3 -c 'from screeninfo import get_monitors; print(list(get_monitors()))'
Here are my outputs:
$ python3 -m screeninfo xrandr
Monitor(x=3440, y=769, width=1536, height=864, width_mm=309, height_mm=174, name='eDP-1')
Monitor(x=0, y=0, width=3440, height=1440, width_mm=800, height_mm=335, name='HDMI-1')
$ python3 -m screeninfo xinerama
Monitor(x=0, y=0, width=3440, height=1440, width_mm=None, height_mm=None, name=None)
Monitor(x=3440, y=769, width=1536, height=864, width_mm=None, height_mm=None, name=None)
$ python3 -m screeninfo
Monitor(x=3440, y=769, width=1536, height=864, width_mm=309, height_mm=174, name='eDP-1')
Monitor(x=0, y=0, width=3440, height=1440, width_mm=800, height_mm=335, name='HDMI-1')
$ python3 -c 'from screeninfo import get_monitors; print(list(get_monitors()))'
[Monitor(x=3440, y=769, width=1536, height=864, width_mm=309, height_mm=174, name='eDP-1'), Monitor(x=0, y=0, width=3440, height=1440, width_mm=800, height_mm=335, name='HDMI-1')]
I also imported that bit of python script in to OBS and it didn't throw an error, which makes me wonder if it's an error in the obs-zoom-and-follow repo. However it is the screeninfo code which is raising the exception due to, apparently, not finding anything.
Similar results here:
$ python3 -m screeninfo
Monitor(x=0, y=0, width=1920, height=1200, width_mm=518, height_mm=324, name='DP-1')
Monitor(x=1920, y=161, width=1680, height=1050, width_mm=474, height_mm=296, name='HDMI-2')
$ python3 -c 'from screeninfo import get_monitors; print(list(get_monitors()))'
[Monitor(x=0, y=0, width=1920, height=1200, width_mm=518, height_mm=324, name='DP-1'), Monitor(x=1920, y=161, width=1680, height=1050, width_mm=474, height_mm=296, name='HDMI-2')]
I would raise an issue there and link to this one here, as it indeed looks like a problem with how this script is executed by the OBS plugin, and solving it requires us to work together. Can I please ask you to create a bug report there?
Done: https://github.com/tryptech/obs-zoom-and-follow/issues/7
(currently looks like there's not a lot of activity in that repo, so not sure whether anything will come from it :-/ )
Does this error in OBS show up when you first add the script to OBS, or only in the case of starting a new instance of OBS after you have added the script in?
@tryptech Sorry, I don't remember if I got the same error already when I added the script ... But yes, it shows up every time I launch OBS now.
Could you possibly remove the script and re-add it? I have this dumb gut feeling that it might be trying to get the monitors too fast.
Sure.
- Reloading script: Same error.
- Removing, then re-adding script: Same error.
Would it make a difference that the script is located in my /home/username/.config/obs/scripts directory?
I've tested it locally by printing the errors catched here
And it seems like obs is unable to properly import ctypes
[testing.py] Traceback (most recent call last):
[testing.py] File "/home/adawolfs/obs/scripts/testing.py", line 5, in <module>
[testing.py] from screeninfo import get_monitors
[testing.py] File "/home/adawolfs/obs/scripts/screeninfo/screeninfo/__init__.py", line 2, in <module>
[testing.py] from .screeninfo import get_monitors
[testing.py] File "/home/adawolfs/obs/scripts/screeninfo/screeninfo/screeninfo.py", line 5, in <module>
[testing.py] from screeninfo import enumerators
[testing.py] File "/home/adawolfs/obs/scripts/screeninfo/screeninfo/enumerators/__init__.py", line 5, in <module>
[testing.py] import screeninfo.enumerators.xrandr
[testing.py] File "/home/adawolfs/obs/scripts/screeninfo/screeninfo/enumerators/xrandr.py", line 4, in <module>
[testing.py] import ctypes
[testing.py] File "/usr/lib/python3.8/ctypes/__init__.py", line 7, in <module>
[testing.py] from _ctypes import Union, Structure, Array
[testing.py] ImportError: /usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so: undefined symbol: PyFloat_Type
This sounds like an installation / packaging problem of your distro, not this library
https://github.com/JonathanSalwan/Triton/issues/276
Can you please post the output of the following commands?
python3 -m screeninfo xrandrand
python3 -m screeninfo xineramaI'm using Mint with MATE and it's working fine for me
--
I have the same problem. Here is the result, under Windows 7 Python 3.7.6 :
code>python -m screeninfo xinerama
Traceback (most recent call last):
File "D:\ProgramFiles\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "D:\ProgramFiles\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "E:\lib\site-packages\screeninfo_main.py", line 23, in
code>python -m screeninfo xrandr
Traceback (most recent call last):
File "D:\ProgramFiles\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "D:\ProgramFiles\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "E:\ib\site-packages\screeninfo_main.py", line 23, in