Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: 27 is not a valid InputSource #258

Closed
madsensh opened this issue May 18, 2023 · 2 comments
Closed

ValueError: 27 is not a valid InputSource #258

madsensh opened this issue May 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@madsensh
Copy link

madsensh commented May 18, 2023

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

@newAM
Copy link
Owner

newAM commented May 18, 2023

Sadly Type-C is not part of the VESA standard, and there doesn't seem to be a consistent pseudo-standard. I sent an email to VESA asking if they plan to update the specification for Type-C but have not heard back.

There's more context in #242

@newAM newAM added the bug Something isn't working label May 18, 2023
@madsensh
Copy link
Author

Thanks for the quick reply. As it turns out, for my simple use case, which is to change back to the displayport input (can't use Dell Display Manager due to work-issued laptop), all I needed was this. Seems to run ok as long as monitorcontrol doesn't try to enumerate the inputs.

monitorcontrol --set-input-source DP1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants