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

datafile.py error #123

Open
chilledgaz opened this issue Jan 3, 2020 · 1 comment
Open

datafile.py error #123

chilledgaz opened this issue Jan 3, 2020 · 1 comment

Comments

@chilledgaz
Copy link

Hello,

Happy New Year!

I wonder if someone could possibly help with this error please?

C:\Program Files\SNMP Simulator\Data>datafile.py --ignore-broken-records --source-record-type=sapwalk --destination-record-type=snmprec --input-file=hp.sapwalk --output-file=hp.snmprec

Input file #0, processing records from the beginning till the end

Traceback (most recent call last):
File "C:\Users\chilled\AppData\Local\Programs\Python\Python38\Scripts\datafile.py", line 202, in
oid, value = recordsSet[srcRecordType].evaluate(line, backdoor=backdoor)
File "c:\users\chilled\appdata\local\programs\python\python38\lib\site-packages\snmpsim\record\dump.py", line 41, in evaluate
oid, tag, value = self.grammar.parse(line)
File "c:\users\chilled\appdata\local\programs\python\python38\lib\site-packages\snmpsim\grammar\sap.py", line 43, in parse
return oid, tag, self.filterMap.get(tag, lambda x: x)(value.strip())
File "c:\users\chilled\appdata\local\programs\python\python38\lib\site-packages\snmpsim\grammar\sap.py", line 29, in __stringFilter
value = [int(value[x:x + 2], 16) for x in range(2, len(value[2:]) + 2, 2)]
File "c:\users\chilled\appdata\local\programs\python\python38\lib\site-packages\snmpsim\grammar\sap.py", line 29, in
value = [int(value[x:x + 2], 16) for x in range(2, len(value[2:]) + 2, 2)]
ValueError: invalid literal for int() with base 16: ',0'

C:\Program Files\SNMP Simulator\Data>

The command fails for HP devices but works for non-HP devices.

Best wishes,

chilledgaz

@gainskills
Copy link

Hi, could you share the file: hp.sapwalk ?

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