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

codec error in winrm-exec.py 'utf-8' codec can't encode characters #93

Open
EddyKIL opened this issue Feb 22, 2023 · 1 comment
Open

Comments

@EddyKIL
Copy link

EddyKIL commented Feb 22, 2023

Hi,
I'm getting the following error, when running job using py-winrm:

'utf-8' codec can't encode characters in position 4903-4904: surrogates not allowed (winrm-exec.py:339)[root]
My job is a simple listing of user directory: dir

Python version: 3.6
Windows nodes: Win Server 2016 Datacenter
py-winrm: 2.1.1

@Enguias
Copy link

Enguias commented Mar 27, 2024

Hello. I have the same exact issue. When executing a python script locally, it works fine. When executing through rundeck using WinRMPython, I get the error message:

[ERROR ] 'utf-8' codec can't encode characters in position 2329-2330: surrogates not allowed (winrm-exec.py:379)[root]

I'm also not outputting any complicated log. Just 3 lines of information. I get the error when using logging module or a basic print.

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

No branches or pull requests

2 participants