Python Forum
ModuleNotFoundError: No module named 'omsdk.sdkproto'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError: No module named 'omsdk.sdkproto'
#1
Can anyone help me to fix this?

I am getting the error like in the subject line.

Traceback (most recent call last):
File "/usr/local/nagios/dell/scripts/dellemc_device_check.py", line 26, in <module>
from omsdk.sdkproto import SNMPOptions
ModuleNotFoundError: No module named 'omsdk.sdkproto'

Any idea?
Reply
#2
pip install omsdk
Reply
#3
I did that already:

pip install omsdk

Requirement already satisfied: omsdk in /home/user/.local/lib/python3.8/site-packages (1.2.490)
Requirement already satisfied: PyYAML>=3.12 in /usr/lib/python3/dist-packages (from omsdk) (5.3.1)
Requirement already satisfied: pysnmp-mibs>=0 in /home/user/.local/lib/python3.8/site-packages (from omsdk) (0.1.6)
Requirement already satisfied: requests>=2.12.3 in /usr/lib/python3/dist-packages (from omsdk) (2.22.0)
Requirement already satisfied: ipaddress>=0 in /home/user/.local/lib/python3.8/site-packages (from omsdk) (1.0.23)
Requirement already satisfied: future>=0.16.0 in /home/user/.local/lib/python3.8/site-packages (from omsdk) (0.18.2)
Requirement already satisfied: pysnmp>=4.3.0 in /home/user/.local/lib/python3.8/site-packages (from pysnmp-mibs>=0->omsdk) (4.4.12)
Requirement already satisfied: pysmi in /home/user/.local/lib/python3.8/site-packages (from pysnmp>=4.3.0->pysnmp-mibs>=0->omsdk) (0.3.4)
Requirement already satisfied: pycryptodomex in /home/user/.local/lib/python3.8/site-packages (from pysnmp>=4.3.0->pysnmp-mibs>=0->omsdk) (3.15.0)
Requirement already satisfied: pyasn1>=0.2.3 in /usr/lib/python3/dist-packages (from pysnmp>=4.3.0->pysnmp-mibs>=0->omsdk) (0.4.2)
Requirement already satisfied: ply in /home/user/.local/lib/python3.8/site-packages (from pysmi->pysnmp>=4.3.0->pysnmp-mibs>=0->omsdk) (3.11)
Reply
#4
I can do quick test in virtual enviromt(it's build into Python in you do not know trough venv)
Do this from command line.
which python
# Or which python 3 if you use that
Make sure it point to your version.
/home/user/.local/lib/python3.8
Start interpreter.
λ python
Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import omsdk
>>>
>>> dir(omsdk)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'main']  
>>> omsdk.main()
Welcome to Dell OpenManage SDK

# File shall point to your python3.8/site-packages
>>> omsdk.__file__
'G:\\div_code\\image_env\\lib\\site-packages\\omsdk\\__init__.py'

# Test import 
>>> from omsdk.sdkproto import SNMPOptions
>>>
>>> dir(omsdk)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'http', 'main', 'sdkcenum', 'sdkcreds', 'sdkentitymib', 'sdkprint', 'sdkproto', 'sdkprotobase', 'sdkprotopref', 'sdksnmp', 'sdkunits', 'simulator', 'version']

 dir(omsdk.sdkproto)
['CredentialsEnum', 'EntityCompEnum', 'EntityComponentTree', 'EntityMibConvertor', 'EntitySNMPViews', 'Enum', 'EnumWrapper', 'PCONSOLE', 'PREDFISH', 'PREST', 'PSNMP', 'PWSMAN', 'PY2', 'PY3', 'PrettyPrint', 'ProtoPreference', 'ProtocolCredentialsFactory', 'ProtocolEnum', 'ProtocolFactory', 'ProtocolFactoryIterator', 'ProtocolOptions', 'ProtocolOptionsFactory', 'ProtocolWrapper', 'RedfishOptions', 'RedfishProtocol', 'RestOptions', 'RestProtocol', 'SNMPOptions', 'SNMPProtocol', 'Simulation', 'Simulator', 'TypeHelper', 'UnitsFactory', 'WSMANOptions', 'WsManOptions', 'WsManProtocol', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'chain', 'copy', 'datetime', 'json', 'logger', 'logging', 'os', 're', 'sys']
Common problem make sure you have not name a file omsdk.py or any other name that shadow the import from omsdk.
rob101 likes this post
Reply
#5
I don't think this is a virtual environment or wrong python problem. If there is no oemsdk package installed, the error would be:
Error:
ModuleNotFoundError: No module named 'omsdk'
That it says
Error:
ModuleNotFoundError: No module named 'omsdk.sdkproto'
points to there being an omsdk somewhere but no omsdk.sdkproto. Did you make a file that is named omsdk.py? I would try import omsdk all by itself and see what happens.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  no module named 'docx' when importing docx MaartenRo 1 894 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 23,818 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 2,604 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 1,464 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,524 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 1,348 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 1,048 Jul-09-2023, 11:24 AM
Last Post: yaoyao22
  Help with pyinstaller "No module named" korenron 9 9,140 Jun-15-2023, 12:20 PM
Last Post: snippsat
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 1,019 May-15-2023, 02:38 PM
Last Post: tonynapoli2309
  ModuleNotFoundError: No module named '_struct' when starting pip3 yuhuihu 0 2,883 May-05-2022, 04:41 AM
Last Post: yuhuihu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020