obsidianforensics/hindsight

KeyError - MediaKey exception

Lou511 opened this issue · 2 comments

Hi Ryan. While parsing an exported Chrome\default directory, I encountered an exception error "KeyError (MediaKey) with a traceback output of:

Traceback (most recent call last):
File "bottle.py", line 868, in _handle
File "bottle.py", line 1748, in wrapper
File "hindsight_gui.py", line 187, in display_results
File "bottle.py", line 3630, in template
File "bottle.py", line 3419, in render
File "bottle.py", line 3406, in execute
File "C:\Users\LMARTI1\AppData\Local\Temp_MEI287322\templates\results.tpl", line 30, in
% include('templates/parsed_artifacts.tpl')
File "bottle.py", line 3396, in _include
File "bottle.py", line 3406, in execute
File "C:\Users\LMARTI
1\AppData\Local\Temp_MEI287322\templates\parsed_artifacts.tpl", line 29, in
{{artifacts_counts[artifact]}}
KeyError: 'Media History'

Just prior to this error, the following was showing in my terminal window:

Detected Chrome version: [ 84 ]
URL records: [ 25124 ]
Download records: [ 268 ]
Media History records: [ 0 ]
GPU Cache records: [ 0 ]
Cookie records: [ 5931 ]
Autofill records: [ 851 ]
Bookmark records: [ 24 ]
Local Storage records: [ 10420 ]
Extensions: [ 12 ]
Extension Cookie records: [ 8 ]
Login Data records: [ 160 ]
Preference Items: [ 131 ]
File System Items: [ 41 ]
Chrome Extension Names (v20150125): - 0 extension URLs parsed -
Generic Timestamp Decoder (v20160907): - 0 timestamps parsed -
Google Analytics Cookie Parser (v20170130): - 0 cookies parsed -
Google Searches (v20160912): - 2353 searches parsed -
Load Balancer Cookie Decoder (v20200213): - 0 cookies parsed -
Quantcast Cookie Parser (v20160907): - 0 cookies parsed -
Query String Parser (v20170225): - 8332 query strings parsed -
Time Discrepancy Finder (v20170129): - 0 differences parsed -
127.0.0.1 - - [20/Apr/2021 15:06:09] "POST /run HTTP/1.1" 303 0

Could you help me with this issue, please? Thanks.

Hi there - sorry about that issue!

If you're running a Python version (not the compiled .exe), if you change pyhindsight\templates\parsed_artifacts.tpl, line 29 to
<td align="right">{{artifacts_counts.get(artifact, 0)}}</td>, that should fix this error. I'll also try to get a fix and new version out soon. Thanks for reporting the issue.

There's a new release out (https://github.com/obsidianforensics/hindsight/releases/tag/v2021.04.26) that should fix this issue - if not, please let me know.