univ-of-utah-marriott-library-apple / display_manager

An open-source Python library which can modify your Mac's display settings manually or automatically.
MIT License
237 stars 18 forks source link

KeyError raised when running `display_manager.py show available` #10

Closed SamBaRufus closed 5 years ago

SamBaRufus commented 5 years ago

This issue is submitted on behalf of Rob:

First, thanks for creating Display Manager!

I’ve been using v1.0.1 successfully for some time, with a trio of different displays (including a MacBook Pro 15-inch’s internal display). No errors, no problems. Today, I connected up a Dell P2415Q, which is the first Retina-type external display I’ve tried. With it attached, various Display Manager commands result in traceback errors, which I’ve never gotten before with your software.

$ display_manager.py show available
display "main":
Traceback (most recent call last):
  File "/usr/local/bin/display_manager.py", line 1257, in <module>
    main()
  File "/usr/local/bin/display_manager.py", line 1250, in main
    commands.run()
  File "/usr/local/bin/display_manager.py", line 671, in run
    command.run()
  File "/usr/local/bin/display_manager.py", line 269, in run
    self.__handleShow()
  File "/usr/local/bin/display_manager.py", line 449, in __handleShow
    for mode in sorted(display.allModes, reverse=True):
  File "/Library/Python/2.7/site-packages/display_manager_lib.py", line 291, in allModes
    uniqueModes.remove(mode)
KeyError: <display_manager_lib.DisplayMode object at 0x1116c6ed0>
SamBaRufus commented 5 years ago

Issue is fixed in 1.0.2