Howdy, noticed the following error today when running nodes-busy
on our cluster.
> nodes-busy
Traceback (most recent call last):
File "/share/apps/rc/bin/nodes-busy", line 1177, in <module>
job_data = get_scontrol_job_data()
File "/share/apps/rc/bin/nodes-busy", line 370, in get_scontrol_job_data
output = out.decode('utf-8').split("\n")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 53196: invalid start byte
I have no idea what's in position 53196
, but I fixed the issue with the following addition to output.decode
to ignore errors:
diff --git a/bin/nodes-busy b/bin/nodes-busy
index 6fb1744..aee728f 100755
--- a/bin/nodes-busy
+++ b/bin/nodes-busy
@@ -367,7 +367,7 @@ def get_scontrol_job_data(target_job = None):
sys.exit(1)
# Split up space-delimited output into a job dictionary
- output = out.decode('utf-8').split("\n")
+ output = out.decode('utf-8', 'ignore').split("\n")
for job in output:
details = job.split(' ')
for i in details: