Can you post a fragment of the snmp log file here? So we can have a look at its actual format.
I have modified my script to remove " and , characters to my best guess since I have not seen the actual data file. And I have added more comments in the code.