Prompt input throws exception
- Dominant language
- Python
- Stars
- 722
- Forks
- 237
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 4
Description
Using latest code base, on Windows (as of 24 Nov 20). After some tweaks to setup.py to get protobufs to compile, openhtf seems to be working.
When running the example 'all_the_things.py' the line (58)
`test.measurements.widget_type = prompts.prompt('What\'s the widget type? (Hint: try `MyWidget` to PASS)', text_input=True)`
throws an excetpion, ending the test immediately. Output is shown below.
It seems to be related to the default timeout being too large. Line 255 of user_input.py waits for 3600 * 24 * 365 if no timeout is given. If a timeout_s argument (of 100s) is given to prompts.prompt(), it works OK.
(env) D:\openhtf> cd d:\openhtf && cmd /C "d:\openhtf\env\Scripts\python.exe c:\Users\Ashley\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\lib\python\debugpy\launcher 53141 -- d:\openhtf\examples\all_the_things.py "
Enter a DUT ID in order to start the test.
--> ash
What's the widget type? (Hint: try `MyWidget` to PASS)
-->
:ERROR
failed phase: hello_world [ran for 0.03 sec]
failed_item: specified_as_args (Outcome.UNSET)
measured_value: UNSET
validators:
validator: 'x' matches /Measurement/
failed_item: widget_type (Outcome.UNSET)
measured_value: UNSET
validators:
validator: 'x' matches /.*Widget$/
failed_item: widget_color (Outcome.UNSET)
measured_value: UNSET
validators:
failed_item: widget_size (Outcome.UNSET)
measured_value: UNSET
validators:
validator: 1 <= x <= 4
exception type: OverflowError
Error: timeout value is too large
(env) D:\openhtf>
Contributor guide
Assessment
This issue has not been assessed yet.