ioc_parser icon indicating copy to clipboard operation
ioc_parser copied to clipboard

Traceback Output

Open inigma117 opened this issue 8 years ago • 0 comments

When parseing PDF's I keep getting this traceback error message:

Traceback (most recent call last): File "/Users/user/Documents/ioc_parser/iocp.py", line 311, in parser.parse(args.PATH) File "/Users/user/Documents/ioc_parser/iocp.py", line 298, in parse self.handler.print_error(path, e) File "/Users/user/Documents/ioc_parser/output.py", line 62, in print_error print(json.dumps(data)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 243, in dumps return _default_encoder.encode(obj) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 207, in encode chunks = self.iterencode(o, _one_shot=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 270, in iterencode return _iterencode(o, 0) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: TypeError("PDFSyntaxError('No /Root object! - Is this really a PDF?',) is not JSON serializable",) is not JSON serializable

Is it possible to have this changed to output the file it is attempting to parse at this time?

I have this loaded into a shell script and running on an entire directory. I think it would be valuable to know what file is causing this issue so I can investigate and fix. Thanks!

inigma117 avatar Mar 03 '16 17:03 inigma117