Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rf_sensor_list.py is failing with different errors #165

Open
gumpana opened this issue Aug 7, 2024 · 4 comments
Open

rf_sensor_list.py is failing with different errors #165

gumpana opened this issue Aug 7, 2024 · 4 comments

Comments

@gumpana
Copy link

gumpana commented Aug 7, 2024

└─# rf_sensor_list.py --user --password --rhost https://
Traceback (most recent call last):
File "/usr/local/bin/rf_sensor_list.py", line 17, in
import redfish
ImportError: No module named redfish

$ rf_sensor_list.py --user --password --rhost https://
'Id'
Traceback (most recent call last):
File "/usr/local/bin/rf_sensor_list.py", line 51, in
redfish_obj.logout()
File "/usr/local/lib/python3.10/dist-packages/redfish/rest/v1.py", line 993, in logout
raise BadRequestError("Invalid session resource: %s, "
redfish.rest.v1.BadRequestError: Invalid session resource: /redfish/v1/SessionService/Sessions/Administratordbb81fa8e614428e8f125b8ecc247b2b, return code: 401
gumpana@silver:~/git/ftf/utils$

@mraineri
Copy link
Contributor

mraineri commented Aug 7, 2024

└─# rf_sensor_list.py --user --password --rhost https://
Traceback (most recent call last):
File "/usr/local/bin/rf_sensor_list.py", line 17, in
import redfish
ImportError: No module named redfish

For the first error, it looks like you don't have the required redfish module installed. Can you run the following and provide the output?

which rf_sensor_list.py
pip3 show redfish redfish_utilities
pip show redfish redfish_utilities

$ rf_sensor_list.py --user --password --rhost https://
'Id'
Traceback (most recent call last):
File "/usr/local/bin/rf_sensor_list.py", line 51, in
redfish_obj.logout()
File "/usr/local/lib/python3.10/dist-packages/redfish/rest/v1.py", line 993, in logout
raise BadRequestError("Invalid session resource: %s, "
redfish.rest.v1.BadRequestError: Invalid session resource: /redfish/v1/SessionService/Sessions/Administratordbb81fa8e614428e8f125b8ecc247b2b, return code: 401
gumpana@silver:~/git/ftf/utils$

It looks like the service you're using is not implemented properly and is missing mandatory properties. Can you add --debug to the command and send the log file produced? That'll show the HTTP traces for where it's hitting an issue.

@gumpana
Copy link
Author

gumpana commented Aug 12, 2024

└─# rf_sensor_list.py --user --password --rhost https://
Traceback (most recent call last):
File "/usr/local/bin/rf_sensor_list.py", line 17, in
import redfish
ImportError: No module named redfish

For the first error, it looks like you don't have the required redfish module installed. Can you run the following and provide the output?

which rf_sensor_list.py
pip3 show redfish redfish_utilities
pip show redfish redfish_utilities

which rf_sensor_list.py

/usr/local/bin/rf_sensor_list.py

pip3 show redfish redfish_utilities

Name: redfish
Version: 3.0.2
Summary: Redfish Python Library
Home-page: https://github.com/DMTF/python-redfish-library
Author: DMTF, https://www.dmtf.org/standards/feedback
Author-email: None
License: BSD 3-clause "New" or "Revised License"
Location: /usr/local/lib/python3.9/dist-packages
Requires: jsonpatch, jsonpath-rw, jsonpointer
Required-by: redfish-utilities

Name: redfish-utilities
Version: 1.1.6
Summary: Redfish Utilities
Home-page: https://github.com/DMTF/Redfish-Tacklebox
Author: DMTF, https://www.dmtf.org/standards/feedback
Author-email: None
License: BSD 3-clause "New" or "Revised License"
Location: /usr/local/lib/python3.9/dist-packages
Requires: XlsxWriter, redfish
Required-by:

pip show redfish redfish_utilities

Name: redfish
Version: 3.0.2
Summary: Redfish Python Library
Home-page: https://github.com/DMTF/python-redfish-library
Author: DMTF, https://www.dmtf.org/standards/feedback
Author-email: None
License: BSD 3-clause "New" or "Revised License"
Location: /usr/local/lib/python3.9/dist-packages
Requires: jsonpath-rw, jsonpointer, jsonpatch
Required-by: redfish-utilities

Name: redfish-utilities
Version: 1.1.6
Summary: Redfish Utilities
Home-page: https://github.com/DMTF/Redfish-Tacklebox
Author: DMTF, https://www.dmtf.org/standards/feedback
Author-email: None
License: BSD 3-clause "New" or "Revised License"
Location: /usr/local/lib/python3.9/dist-packages
Requires: redfish, XlsxWriter
Required-by:

@gumpana
Copy link
Author

gumpana commented Aug 12, 2024

PLease note that I am not able to reproduce second issue now. Not sure if any configuraton got updated on that setup

@mraineri
Copy link
Contributor

For your first issue, do you have other versions of Python installed? It looks like everything is installed under Python3.9, but if it runs from a different Python instance, that might be where you're seeing a conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants