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

Import Error #36

Open
karthi81 opened this issue Mar 8, 2019 · 3 comments
Open

Import Error #36

karthi81 opened this issue Mar 8, 2019 · 3 comments

Comments

@karthi81
Copy link

karthi81 commented Mar 8, 2019

(ucs_ops) [vagrant@cisco-vagrant cimc_ansible]$ python claim_device.py --help
Traceback (most recent call last):
File "claim_device.py", line 10, in
import device_connector
ImportError: No module named device_connector
(ucs_ops) [vagrant@cisco-vagrant cimc_ansible]$

device_connector is is available and tested on python 2.7 and 3.6

Can you please take a look?

@szolucha
Copy link

szolucha commented Apr 8, 2022

If I run it from intersight-python-master path:
I have the same problem: ModuleNotFoundError: No module named 'device_connector' of

$ py claim_device.py -a intersight_api_params -d devices
Traceback (most recent call last):
File "claim_device.py", line 10, in
import device_connector
ModuleNotFoundError: No module named 'device_connector'

if I run in from intersight-python-master\examples path
I have a different problem: No module named 'intersight.intersight_api_client'

$ py claim_device.py -a intersight_api_params -d devices
Traceback (most recent call last):
File "claim_device.py", line 8, in
from intersight.intersight_api_client import IntersightApiClient
ModuleNotFoundError: No module named 'intersight.intersight_api_client'


$ python -V
Python 3.7.0


$ pip list
Package Version
certifi 2021.5.30
cffi 1.14.5
chardet 4.0.0
cryptography 3.4.7
idna 2.10
intersight 1.0.9.5808
pem 21.2.0
pip 22.0.4
pycparser 2.20
pycryptodome 3.14.1
pycryptodomex 3.14.1
PySimpleGUI 4.45.0
python-dateutil 2.8.2
requests 2.25.1
setuptools 62.0.0
six 1.16.0
tabulate 0.8.9
urllib3 1.26.5
wheel 0.37.1

@dsoper2
Copy link
Contributor

dsoper2 commented Apr 8, 2022

With newer python SDKs (installed with PIP), the claim_target.py script from https://github.com/CiscoDevNet/intersight-python-utils/tree/master/config_targets can be used. Example usage is the following (needs to be run from the config_targets subdir):

python claim_target.py -t sjc07_devices.json

The older claim_device.py script does not work with newer SDKs.

@szolucha
Copy link

szolucha commented Apr 8, 2022

My current Iintersight package ver. is 1.0.9.5808. It seems to be the latest per pypi.org:
https://pypi.org/search/?q=intersight
intersight 1.0.9.5808

Dave are you referring to intersight-rest: intersight-rest 1.1.7 ?
Thx for quick turn around!

Derek

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

3 participants