Ugly backtrace when working with non UTF-8 files #231

Closed
opened 2021-11-20 15:22:03 +00:00 by ungleich-gitea · 2 comments

Created by: telmich

As seen here:

Traceback (most recent call last):
File "/tmp/tmpv0mhou/bin/ssh_authorized_keys", line 183, in
emulator.run()
File "/home/cdist/cdist/cdist/emulator.py", line 84, in run
self.setup_object()
File "/home/cdist/cdist/cdist/emulator.py", line 154, in setup_object
self.cdist_object.parameters = self.parameters
File "/home/cdist/cdist/cdist/util/fsproperty.py", line 227, in __set

attribute_instance.update(value)
File "/usr/lib/python3.2/_abcoll.py", line 504, in update
self[key] = other[key]
File "/home/cdist/cdist/cdist/util/fsproperty.py", line 143, in
setitem
fd.write(str(v) + '\n')
UnicodeEncodeError: 'ascii' codec can't encode characters in position
391-392: ordinal not in range(128)
ERROR: vip-004-staging.panter.ch: Command failed: /bin/sh -e
/tmp/tmpv0mhou/conf/type/panter_rails_ssh_keys/manifest
ERROR: wittbib-staging.panter.ch: Command failed: /bin/sh -e
/tmp/tmp2s7iqe/conf/type/__panter_rails_ssh_keys/manifest
INFO: avc-staging.panter.ch: Running manifest and explorers for
__panter_rails_nginx/
INFO: zahnfee.denteo.ch: Running manifest and explorers for
__panter_rails_ssh_keys/
INFO: chatbyphonak.com: Running manifest and explorers for
__panter_rails_hosting/
INFO: recomy-staging.panter.ch: Running manifest and explorers for
__package/default-jre-headless
INFO: uf-staging.panter.ch: Running manifest and explorers for
__package/default-jdk
INFO: metaflop-production.panter.ch: Running manifest and explorers for
__panter_rails_hosting/
INFO: uf-production.panter.ch: Running manifest and explorers for
__package/maven2
Traceback (most recent call last):
File "/tmp/tmpdzvwqs/bin/__ssh_authorized_keys", line 183, in
emulator.run()
File "/home/cdist/cdist/cdist/emulator.py", line 84, in run
self.setup_object()
File "/home/cdist/cdist/cdist/emulator.py", line 154, in setup_object
self.cdist_object.parameters = self.parameters
File "/home/cdist/cdist/cdist/util/fsproperty.py", line 227, in __set

attribute_instance.update(value)
File "/usr/lib/python3.2/_abcoll.py", line 504, in update
self[key] = other[key]
File "/home/cdist/cdist/cdist/util/fsproperty.py", line 143, in
setitem
fd.write(str(v) + '\n')
UnicodeEncodeError: 'ascii' codec can't encode characters in position
391-392: ordinal not in range(128)

*Created by: telmich* As seen here: Traceback (most recent call last): File "/tmp/tmpv0mhou/bin/**ssh_authorized_keys", line 183, in <module> emulator.run() File "/home/cdist/cdist/cdist/emulator.py", line 84, in run self.setup_object() File "/home/cdist/cdist/cdist/emulator.py", line 154, in setup_object self.cdist_object.parameters = self.parameters File "/home/cdist/cdist/cdist/util/fsproperty.py", line 227, in __set** attribute_instance.update(value) File "/usr/lib/python3.2/_abcoll.py", line 504, in update self[key] = other[key] File "/home/cdist/cdist/cdist/util/fsproperty.py", line 143, in __setitem__ fd.write(str(v) + '\n') UnicodeEncodeError: 'ascii' codec can't encode characters in position 391-392: ordinal not in range(128) ERROR: vip-004-staging.panter.ch: Command failed: /bin/sh -e /tmp/tmpv0mhou/conf/type/**panter_rails_ssh_keys/manifest ERROR: wittbib-staging.panter.ch: Command failed: /bin/sh -e /tmp/tmp2s7iqe/conf/type/__panter_rails_ssh_keys/manifest INFO: avc-staging.panter.ch: Running manifest and explorers for __panter_rails_nginx/ INFO: zahnfee.denteo.ch: Running manifest and explorers for __panter_rails_ssh_keys/ INFO: chatbyphonak.com: Running manifest and explorers for __panter_rails_hosting/ INFO: recomy-staging.panter.ch: Running manifest and explorers for __package/default-jre-headless INFO: uf-staging.panter.ch: Running manifest and explorers for __package/default-jdk INFO: metaflop-production.panter.ch: Running manifest and explorers for __panter_rails_hosting/ INFO: uf-production.panter.ch: Running manifest and explorers for __package/maven2 Traceback (most recent call last): File "/tmp/tmpdzvwqs/bin/__ssh_authorized_keys", line 183, in <module> emulator.run() File "/home/cdist/cdist/cdist/emulator.py", line 84, in run self.setup_object() File "/home/cdist/cdist/cdist/emulator.py", line 154, in setup_object self.cdist_object.parameters = self.parameters File "/home/cdist/cdist/cdist/util/fsproperty.py", line 227, in __set** attribute_instance.update(value) File "/usr/lib/python3.2/_abcoll.py", line 504, in update self[key] = other[key] File "/home/cdist/cdist/cdist/util/fsproperty.py", line 143, in __setitem__ fd.write(str(v) + '\n') UnicodeEncodeError: 'ascii' codec can't encode characters in position 391-392: ordinal not in range(128)
ungleich-gitea added the
Stale
label 2021-11-20 15:22:03 +00:00
Author
Owner

closed

closed
Author
Owner

Created by: telmich

Problem was a ssh pubkey with non-utf8 characters inside. I guess we should throw a cdist error mentioning we could not decode the input

*Created by: telmich* Problem was a ssh pubkey with non-utf8 characters inside. I guess we should throw a cdist error mentioning we could not decode the input
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#231
No description provided.