Skip to content

ValueError: 27 is not a valid InputSource #258

Closed
@madsensh

Description

@madsensh

Getting an error regarding an unrecognized InputSource value. Based on my monitor's inputs and reviewing the list on lines 28-46 of monitorcontrol.py, I'm guessing it may be for the USB-C input. I can try creating a fork and adding that as a possible value, but wanted to double check with you if there is some standard list of input codes I should be referencing.


  • Monitor manufacturer and model number: Dell U4924DW
  • Input source (HDMI, VGA, display port, ect.): USB-C
  • Output device (video card, discrete graphics, ect.):
  • Operating system: Windows 10
  • Python version: 3.11.1
  • monitorcontrol version (monitorcontrol --version): 3.0.3

Steps to Reproduce

monitorcontrol --get-monitors -vvvv

Traceback (most recent call last):
File "C:\Users\user\apps\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\monitorcontrol\monitorcontrol.py", line 397, in get_input_source
return InputSource(value)
^^^^^^^^^^^^^^^^^^
File "C:\Users\user\apps\WPy64-31110\python-3.11.1.amd64\Lib\enum.py", line 715, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\apps\WPy64-31110\python-3.11.1.amd64\Lib\enum.py", line 1131, in new
raise ve_exc
ValueError: 27 is not a valid InputSource

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\user\apps\WPy64-31110\python-3.11.1.amd64\Scripts\monitorcontrol.exe_main
.py", line 7, in
File "C:\Users\user\apps\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\monitorcontrol_main
.py", line 158, in main
current_input = monitor_obj.get_input_source()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\apps\WPy64-31110\python-3.11.1.amd64\Lib\site-packages\monitorcontrol\monitorcontrol.py", line 399, in get_input_source
raise InputSourceValueError(
monitorcontrol.monitorcontrol.InputSourceValueError: 27 is not a valid InputSource

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions