PyWinRM connector apparently can't handle UTF correctly.

46 views
Skip to first unread message

David Albuquerque

unread,
Jul 14, 2025, 12:02:08 PMJul 14
to rundeck-discuss
Hi!

A few months ago we switched from WinRM to PyWinRM to connect rundeck to our windows nodes, where we run multiple python scripts. 

This has resulted on some jobs showing up as failed on rundeck, even though they concluded successfully on the windows machine, given the fact that PyWinRM can't process characters outside of UTF-8, unlike WinRM. So, when a python script tries to log something outside of UTF-8, the job fails.

This an output example:
06/02/2025 12:46:09 - INFO - #####################START#####################
06/02/2025 12:46:09 - INFO - Execution mode REPROCESS
06/02/2025 12:46:09 - INFO - Reprocessing mode
[ERROR  ]  'utf-8' codec can't decode byte 0xe3 in position 17162: invalid continuation byte (winrm-exec.py:362)[root]
[ERROR  ]  'utf-8' codec can't decode byte 0xe3 in position 446: invalid continuation byte (winrm-exec.py:362)[root]
[ERROR  ]  'utf-8' codec can't decode byte 0xe3 in position 429: invalid continuation byte (winrm-exec.py:362)[root]

And this only started happening after the switch to PyWinRM. As a temp fix, we are changing the logs to not include "à" or "õ" or those kind of characters (which are quite frequent in portuguese), but we were wondering... Is this fixable? Is this a setting on rundeck or on the node definition?

Thanks in advance for any help.




rac...@rundeck.com

unread,
Jul 14, 2025, 2:07:32 PMJul 14
to rundeck-discuss
Hi,

What plugin version are you using? The latest version can handle UTF-8 characters. Take a look.

Regards.

David Albuquerque

unread,
Jul 16, 2025, 5:11:52 AMJul 16
to rundeck-discuss
Hi. I'm using 0.4.3! Do i only need to update it using pip on my windows machine? Or do I have to something node definition wise?

rac...@rundeck.com

unread,
Jul 17, 2025, 11:35:54 AMJul 17
to rundeck-discuss
Hi David,

I mean, the Rundeck Pywinrm plugin version. You can check that by clicking the up to right cog plugin > plugins > installed plugins and then looking for the "WinRM Node Executor Python", the current version is 2.1.3.

Regards.

David Albuquerque

unread,
Jul 21, 2025, 5:30:33 AMJul 21
to rundeck-discuss
Understood! Sorry for the misunderstanding.

We are indeed on the latest version, the 2.1.3, which probably means that the plugin version is not the problem.

rac...@rundeck.com

unread,
Jul 21, 2025, 5:40:27 PMJul 21
to rundeck-discuss
Hello David,

Can you file a new issue here?

Please include information about your Rundeck instance server and remote operating systems (including the native charset used).

Regards.

rac...@rundeck.com

unread,
Jul 21, 2025, 5:47:25 PMJul 21
to rundeck-discuss
Alternatively, please add this parameter to your Rundeck launching script/command.

Greetings.

David Albuquerque

unread,
Aug 11, 2025, 12:35:09 PMAug 11
to rundeck-discuss
Hi!

A few days have passed and I still could not find a fix for it.

I tried this suggestion, but still nothing.

I was also going to report a new issue on the repo but I noticed that there was already an issue opened for this problem and I've also commented on it more than a year ago. :)

Thanks for the help anyway, I'll wait until there is an actual fix for it!

I appreciate your time and effort on trying to help me. Have a good one.
Reply all
Reply to author
Forward
0 new messages