-
Notifications
You must be signed in to change notification settings - Fork 3k
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
SetConsoleMode throws an error when locust is run from Jenkins Powershell #1654
Comments
I think this is related to keyboard input handling. Can you have a look @DennisKrone ? Probably we should just catch and ignore this error. Might want to output a log message about keyboard input being disabled when it happens as well. For now, only workaround is going back to a pre 1.4 version. |
The same to you,uers can not work when it happened. [2020-12-11 15:53:00,912] lep/CRITICAL/locust.main: Unhandled exception in greenlet: <Greenlet at 0x24797943908: input_listener_func> |
@cyberw & @DennisKrone: |
We considered adding that when implementing it, but I think it is better to just fail and (maybe) log when it has failed to initialize. There should never be any fatal errors, so there should be no need to work around that (once we fix this issue). We could of course make it opt-in, but the list of parameters is already getting very long, and I think keeping it simple is just as important :) |
Ok 👍 One thing I've thought about is to implement a fully fledged terminal GUI using Urwid (https://github.com/urwid/urwid), similar to somthing like htop. However, that would require quite a large development effort from someone. |
Can you try with latest master @jasuomi or @1183746881 ? |
I realize it's 2 years later, but now I am seeing this error when I did not used to. I'm using the latest version of locust (2.8.2), running on a Gitlab runner. Python version is 3.10.0. Addendum: as with the original poster, when I run from the command line, no problem at all; runs fine. How do I even start to troubleshoot this? Here is my stack-trace:
Thanks in advance. |
@DennisKrone can you have a look? |
Fixed "again" in c3ec9dd |
Describe the bug
Error message is printed out to console right after the test is started in Jenkins and job fails on exit code 2 even actual test passes. We have run locust performance tests over a year on Jenkins without similar problem. Tests started to fail recently after we updated Python and Locustio versions to latest. Locust test run without a problem if it is started on Windows desktop Powershell (or cmd).
Expected behavior
Locust tests should run on CI as they run on local machine.
Actual behavior
Error "pywintypes.error: (6, 'SetConsoleMode', 'The handle is invalid.')" is printed out to console right after the test is started in Jenkins and job fails on exit code 2 even actual test passes.
Steps to reproduce
Start command
locust -f .\locust_test.py --headless --run-time 3
Console from Jenkins:
Console from local PC's Powershell
Environment
The text was updated successfully, but these errors were encountered: