[bug] Ctrl+V does not work in guardrails cli on Windows
CalebCourier opened this issue · comments
Describe the bug
When a user runs guardrails configure
part of the prompt is pasting in their token. On Windows specifically, the command line behaviour within the cli differs from the command line outside of this process where pasting via Ctrl+V
does not work. If the user right-clicks then the value is pasted and the process can move forward, but the arguable more normal interaction of using Ctrl-V
does not.
This behaviour has been witnessed in Command Prompt on Windows 11, as well as in Command Prompt, PowerShell, and Git BASH on a virtual environment running Windows 10 (Server 2022 based) (WSP).
To Reproduce
Steps to reproduce the behavior:
- RAIL spec
- Runtime arguments (e.g.
guard(...)
)
Expected behavior
A clear and concise description of what you expected to happen.
Library version:
Version (e.g. 0.1.5)
0.4.2+
Additional context
Add any other context about the problem here.
Prerequisites
- Windows machine (Windows 10 or 11)
- Open Command Prompt (
cmd.exe
)
To reproduce
- Install
guardrails-ai
as per the Getting Started guide:pip install guardrails-ai
. - Run
guardrails configure
as per the same. - Guardrails Hub responds with it own
Token:
prompt, awaiting user response - Pasting the Guardrails Hub token via
Ctrl+V
and thenEnter
causes an error cascade that starts with:
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\<userName>\AppData\Local\Programs\Python\Python312\Lib\site-packages\jwt\jws.py", line 76, in _decode_segments
signing_message, signature_b64 = message.rsplit('.', 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
Expected behavior:
Pasting the Guardrails Hub token with Ctrl+V
and then Enter
should accept the token and allow the user to continue with the configuration.
Library Version
0.4.3
Additional context
Pasting the token value via a right mouse click, followed by Enter
behaves as expected and allows the configuration to finish.