TypeError: string argument without an encoding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyghmi |
New
|
Undecided
|
Unassigned |
Bug Description
Traceback (most recent call last):
File "/usr/local/
data=self.iana + b'\x00\x00\x01')
File "/usr/local/
raise exc.IpmiExcepti
pyghmi.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./ipmi_
print(
File "/usr/local/
for sensor in self._oem.
File "/usr/local/
return self.immhandler
File "/usr/local/
} for x in self.get_
File "/usr/local/
self.
File "/usr/local/
self.iana = bytearray(
TypeError: string argument without an encoding
--- energy.py 2020-03-25 12:28:56.840767989 +0300
+++ energy-fix.py 2020-03-25 12:29:39.569242159 +0300
@@ -30,9 +30,9 @@
except pygexc.
if ie.ipmicode == 193: # try again with IBM IANA
- self.iana = bytearray(
+ self.iana = bytearray(
- data=self.iana + '\x00\x00\x01')
+ data=self.iana + b'\x00\x00\x01')
else:
if rsp['data'][4:6] not in (b'\x02\x01', b'\x02\x06', b'\x02\x09'):
--- pyghmi/ pyghmi/ ipmi/oem/ lenovo/ energy. py 2020-03-25 12:28:56.840767989 +0300 pyghmi/ ipmi/oem/ lenovo/ energy. py 2020-03-25 12:29:39.569242159 +0300
data= self.iana + b'\x00\x00\x01') IpmiException as ie: '\x4d\x4f\ x00') b'\x4d\ x4f\x00' )
rsp = ipmicmd. xraw_command( netfn=0x2e, command=0x82,
raise
+++ pyghmi/
@@ -30,9 +30,9 @@
except pygexc.
if ie.ipmicode == 193: # try again with IBM IANA
- self.iana = bytearray(
+ self.iana = bytearray(
- data=self.iana + '\x00\x00\x01')
+ data=self.iana + b'\x00\x00\x01')
else:
if rsp['data'][4:6] not in (b'\x02\x01', b'\x02\x06', b'\x02\x09'):