Giter Club home page Giter Club logo

py-snmp-utils's Introduction

πŸ‘‹ Hi, I'm Alexandre GOSSARD

I am a french developer specializing in the development of web applications and DevOps.

Twitter Follow Github Follow Linkedin Follow Instagram Follow Discord Follow Youtube Follow Twitch Follow

🌍 I'm based at ChÒlons-en-Champagne in France
πŸ–₯️ See my portfolio on my official homepage
βœ‰οΈ You can contact me at [email protected]
🧠 I'm currently learning Framer-Motion, Hedera SDK
🀝 I'm open to collaborate on opensource projects and future cooperations.


πŸš€ Skills

Languages

Workflow

Frameworks

Database

Applications

Monitoring

Runtime


πŸ’» Stats

py-snmp-utils's People

Contributors

hakkaofdev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

alestrio

py-snmp-utils's Issues

SNMP Set Issue

Hello,
I'm trying an SNMP set based on your lib.

Here's my code :

    def set_interface_vlan(self, interface_id, vlan_id):
        self.set(self.OIDS['interfaces']['sets']['vlan']+f'.{interface_id}', vlan_id)

And here's the error :

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 75, in __call__
    return await self.app(scope, receive, send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\uvicorn\middleware\debug.py", line 96, in __call__
    raise exc from None
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\uvicorn\middleware\debug.py", line 93, in __call__
    await self.app(scope, receive, inner_send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\fastapi\applications.py", line 208, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
    raise exc
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\exceptions.py", line 82, in __call__
    raise exc
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\routing.py", line 61, in app
    response = await func(request)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\fastapi\routing.py", line 226, in app
    raw_response = await run_endpoint_function(
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\fastapi\routing.py", line 161, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\starlette\concurrency.py", line 39, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\anyio\to_thread.py", line 28, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 805, in run_sync_in_worker_thread
    return await future
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 743, in run
    result = func(*args)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\api\api_run.py", line 65, in set_vlan_on_interface
    if gateway.set_interface_vlan(if_id, body.vlan_id):
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\api\snmp\snmpGateway.py", line 104, in set_interface_vlan
    self.set(self.OIDS['interfaces']['sets']['vlan']+f'.{interface_id}', vlan_id)
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\api\snmp\snmp_utils.py", line 60, in set
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().setCmd(
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\pysnmp\entity\rfc3413\oneliner\cmdgen.py", line 193, in setCmd
    for (errorIndication,
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\pysnmp\hlapi\asyncore\sync\cmdgen.py", line 214, in setCmd
    cmdgen.setCmd(snmpEngine, authData, transportTarget,
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\pysnmp\hlapi\asyncore\cmdgen.py", line 241, in setCmd
    contextData.contextName, vbProcessor.makeVarBinds(snmpEngine, varBinds),
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\pysnmp\hlapi\varbinds.py", line 34, in makeVarBinds
    elif isinstance(varBind[0][0], tuple):  # legacy
  File "C:\Users\ALESTRIO\Documents\Projet\sdn-api\venv\lib\site-packages\pysnmp\smi\rfc1902.py", line 708, in __getitem__
    raise SmiError('%s object not fully initialized' % self.__class__.__name__)
pysnmp.smi.error.SmiError: ObjectType object not fully initialized

What's the cause of this adn how to fix it ?

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.