Comments (5)
now I got a different error:
Traceback (most recent call last):
File "./fru.py", line 32, in <module>
main()
File "./fru.py", line 28, in main
fru = ipmi.get_fru_inventory(0)
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 88, in get_fru_inventory
return FruInventory(self.read_fru_data(fru_id=fru_id))
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 391, in __init__
self._from_data(data)
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 402, in _from_data
self.board_info_area = InventoryBoardInfoArea(
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 158, in __init__
self._from_data(data)
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 230, in _from_data
self.manufacturer = FruDataField(data, offset)
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 114, in __init__
self._from_data(data, offset, force_lang_english)
File "/usr/local/lib/python3.8/site-packages/pyipmi/fru.py", line 133, in _from_data
self.value = chr_data.decode('6bitascii')
AttributeError: 'str' object has no attribute 'decode'
from python-ipmi.
Hi,
take a look into the example https://github.com/kontron/python-ipmi/blob/master/examples/dcmi.py.
You have to set a proper target.
from python-ipmi.
Thanks, I added the target, now I'm getting something different:
#!/bin/env python
import pyipmi
import pyipmi.interfaces
def main():
interface = pyipmi.interfaces.create_interface('ipmitool',
interface_type='lanplus')
ipmi = pyipmi.create_connection(interface)
ipmi.session.set_session_type_rmcp('10.8.1.18', port=623)
ipmi.session.set_auth_type_user('root', 'pass')
ipmi.session.establish()
ipmi.target = pyipmi.Target(ipmb_address=0x20)
fru = ipmi.get_fru_inventory(0)
ipmi.session.close()
if __name__ == "__main__":
main()
Error:
File "./ipmi11.py", line 19, in <module>
main()
File "./ipmi11.py", line 14, in main
fru = ipmi.get_fru_inventory()
File "/usr/lib/python2.7/site-packages/pyipmi/fru.py", line 88, in get_fru_inventory
return FruInventory(self.read_fru_data(fru_id=fru_id))
File "/usr/lib/python2.7/site-packages/pyipmi/fru.py", line 58, in read_fru_data
area_size = self.get_fru_inventory_area_info(fru_id)
File "/usr/lib/python2.7/site-packages/pyipmi/fru.py", line 35, in get_fru_inventory_area_info
fru_id=fru_id)
File "/usr/lib/python2.7/site-packages/pyipmi/__init__.py", line 206, in send_message_with_name
rsp = self.send_message(req)
File "/usr/lib/python2.7/site-packages/pyipmi/__init__.py", line 190, in send_message
rsp = self.interface.send_and_receive(req)
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 147, in send_and_receive
req_data.tostring())
File "/usr/lib/python2.7/site-packages/pyipmi/interfaces/ipmitool.py", line 119, in send_and_receive_raw
raise RuntimeError('ipmitool failed with rc=%d' % rc)
RuntimeError: ipmitool failed with rc=127
from python-ipmi.
Heiko @hthiery
I literally copy&pasted the script you referenced, and I get the same rc=127, on centos7/py2.7&py3.6 and centos8stream/py3.8, ubuntu2004/py3.8. Thanks.
Traceback (most recent call last):
File "./dcmi.py", line 47, in <module>
main()
File "./dcmi.py", line 28, in main
caps = ipmi.get_dcmi_capabilities(selector)
File "/usr/local/lib/python3.8/site-packages/pyipmi/dcmi.py", line 30, in get_dcmi_capabilities
rsp = self.send_message_with_name('GetDcmiCapabilities',
File "/usr/local/lib/python3.8/site-packages/pyipmi/__init__.py", line 206, in send_message_with_name
rsp = self.send_message(req)
File "/usr/local/lib/python3.8/site-packages/pyipmi/__init__.py", line 190, in send_message
rsp = self.interface.send_and_receive(req)
File "/usr/local/lib/python3.8/site-packages/pyipmi/interfaces/ipmitool.py", line 146, in send_and_receive
rsp_data = self.send_and_receive_raw(req.target, req.lun, req.netfn,
File "/usr/local/lib/python3.8/site-packages/pyipmi/interfaces/ipmitool.py", line 119, in send_and_receive_raw
raise RuntimeError('ipmitool failed with rc=%d' % rc)
RuntimeError: ipmitool failed with rc=127
from python-ipmi.
What version of python-ipmi are you using?
from python-ipmi.
Related Issues (20)
- Specific SDR sensor records are being parsed 2 times
- Improve performance on interface ipmitool? HOT 4
- ipmitool errors are not read correctly HOT 1
- SDR record type 0x13 HOT 2
- Typo devide_id_string HOT 1
- unsupported format string HOT 3
- package owns /usr/lib/python3.10/site-packages/tests HOT 1
- voltage sensor and raw_command HOT 3
- establish the session via ipv6 HOT 1
- Migrate nose testing framework to other testing frameworks HOT 2
- Top-level exception is raised when the total length of an IPMI pdu exceed the value of its payload_length attribute
- an issue creating ebuild for your library HOT 3
- Changing privilege level HOT 6
- fru: 6bitascii decode is not supported HOT 5
- Useless dependency of future HOT 2
- Transactions retry unassigned variable and infinite loop HOT 1
- -C Cypher support HOT 1
- Occasional hang when calling IPMI functions HOT 1
- get_sensor_reading() Returns 'CompletionCodeError cc=0xcc desc=Invalid data field in Request' HOT 24
- Getting SDR repository should work when there is an unknown record HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-ipmi.