screeninfo.get_monitors() return an empty list on OSX
- Vorherrschende Sprache
- Python
- Sterne
- 93.8k
- Forks
- 7.7k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
### Describe the bug
After cloning the repo, installing with `pip install -e .` and running `manimgl example_scenes.py` I get an error due to
`get_monitors()` returning an empty list.
```
>>> import screeninfo
>>> screeninfo.get_monitors()
[]
```
But since I am using OS X, I run the example from [screeninfo](https://github.com/rr-/screeninfo#forcing-environment):
```
>>> screeninfo.get_monitors(screeninfo.Enumerator.OSX)
[Monitor(x=0, y=0, width=1680, height=1050, width_mm=None, height_mm=None, name=None)]
```
**Code**:
`example_scenes.py`
**Wrong display or Error traceback**:
```
Traceback (most recent call last):
File "/Users/eisamar/.virtualenvs/manimgl-s7-qgcON/bin/manimgl", line 10, in
sys.exit(main())
File "/Users/eisamar/devel/manimgl/manim/manimlib/__main__.py", line 13, in main
config = manimlib.config.get_configuration(args)
File "/Users/eisamar/devel/manimgl/manim/manimlib/config.py", line 237, in get_configuration
monitor = get_monitors()[custom_config["window_monitor"]]
IndexError: list index out of range
```
### Additional context
If I change `manimlib/config.py` to use `Enumerator.OSX` I get a new error on `File "/Users/eisamar/devel/manimgl/manim/manimlib/window.py", line 41, in find_initial_position`. Changing also that resolves the problem (for me :p).
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.