GW2Raidar / gw2raidar

A log parsing website for Guild Wars 2 combat logs
http://www.gw2raidar.com
GNU General Public License v3.0
20 stars 14 forks source link

start_event missing? or something #163

Closed amadanmath closed 7 years ago

amadanmath commented 7 years ago
  File "/var/www/apps/gw2raidar/raidar/management/commands/process_uploads.py", line 193, in analyse_upload
    analyser = Analyser(evtc_encounter)
  File "/var/www/apps/gw2raidar/analyser/analyser.py", line 233, in __init__
    start_timestamp = start_event['value'][0]
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/series.py", line 601, in __getitem__
    result = self.index.get_value(self, key)
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/indexes/base.py", line 2477, in get_value
    tz=getattr(series.dtype, 'tz', None))
  File "pandas/_libs/index.pyx", line 98, in pandas._libs.index.IndexEngine.get_value (pandas/_libs/index.c:4404)
  File "pandas/_libs/index.pyx", line 106, in pandas._libs.index.IndexEngine.get_value (pandas/_libs/index.c:4087)
  File "pandas/_libs/index.pyx", line 154, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5126)
  File "pandas/_libs/hashtable_class_helper.pxi", line 759, in pandas._libs.hashtable.Int64HashTable.get_item (pandas/_libs/hashtable.c:14031)
  File "pandas/_libs/hashtable_class_helper.pxi", line 765, in pandas._libs.hashtable.Int64HashTable.get_item (pandas/_libs/hashtable.c:13975)
KeyError: 0

60557.evtc.zip

immortius commented 7 years ago

Apparently sometimes there are events before the start event (actually at the same time instance, but earlier in the event list). We expect it to be the first event though (we access it via [0], but that refers to the index in the dataframe and it doesn't become zero just because we filter out all rows). Changed to .iloc[0].

merforga commented 7 years ago

Version 0.9.4 released on 2017-09-11 16:23:01