pysnmp icon indicating copy to clipboard operation
pysnmp copied to clipboard

Presence of directory 'pysnmp_mibs' in project causes OS path TypeError

Open dschultzca opened this issue 4 years ago • 0 comments

Using example code:

from pysnmp.entity.rfc3413.oneliner import cmdgen

cmdGen = cmdgen.CommandGenerator()

errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd(
    cmdgen.CommunityData('public'),
    cmdgen.UdpTransportTarget(('localhost', 161)),
    '1.3.6.1.2.1.1.9.1.4.1',
    lookupNames=True, lookupValues=True
)

name, value = varBinds[0]
print(name, value)

Directory Structure

Directory of C:\Users\user1\repositories\Logger

2020-05-14  12:33 PM    <DIR>          .
2020-05-14  12:33 PM    <DIR>          ..
2020-05-14  12:33 PM               484 lookup.py
2020-05-08  09:32 AM    <DIR>          venv
2020-05-14  12:20 PM    <DIR>          pysnmp_mibs
2020-05-08  09:31 AM                14 requirements.txt

I'm trying to keep the venv contained and thought I could use ./pysnmp_mibs Runs without error if I delete pysnmp_mibs directory.

typeerror.txt

dschultzca avatar May 14 '20 16:05 dschultzca