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

Crash when generating token #2

Open
danielp96 opened this issue Jul 31, 2023 · 0 comments · May be fixed by #3
Open

Crash when generating token #2

danielp96 opened this issue Jul 31, 2023 · 0 comments · May be fixed by #3

Comments

@danielp96
Copy link

The script crashes with the error:

File "/home/$USER/bin/totp", line 50, in <module>
    args.print_only or pyperclip.copy(token)
pyperclip.PyperclipException: only str, int, float, and bool values can be copied to the clipboard, not bytes
danielp96 added a commit to danielp96/totp-auth that referenced this issue Jul 31, 2023
Decode token from bytes to UTF-8 before printing/copying to clipboard.

This allows printing without the b'TOKEN' syntax of python and pyperclip to copy string to clipboard (raw bytes not supported).

Fixes twilfong#2
@danielp96 danielp96 linked a pull request Jul 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant