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

[bug] Ctrl+V does not work in guardrails cli on Windows #722

Open
CalebCourier opened this issue Apr 18, 2024 · 1 comment
Open

[bug] Ctrl+V does not work in guardrails cli on Windows #722

CalebCourier opened this issue Apr 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@CalebCourier
Copy link
Collaborator

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:

  1. RAIL spec
  2. 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.

@CalebCourier CalebCourier added the bug Something isn't working label Apr 18, 2024
@optimax
Copy link

optimax commented Apr 18, 2024

Prerequisites

  1. Windows machine (Windows 10 or 11)
  2. Open Command Prompt (cmd.exe)

To reproduce

  1. Install guardrails-ai as per the Getting Started guide: pip install guardrails-ai.
  2. Run guardrails configure as per the same.
  3. Guardrails Hub responds with it own Token: prompt, awaiting user response
  4. Pasting the Guardrails Hub token via Ctrl+V and then Enter 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.

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