hasegaw / IkaLog

IkaLog; Data Collector for Splatoon
Apache License 2.0
271 stars 42 forks source link

ResultDetail raised a exception #457

Closed kuenishi closed 7 years ago

kuenishi commented 7 years ago

After I updated MacPorts to 2.4.0 from 2.3.5 following error started happening when matching result screen after a battle. I have no idea on what happened inside, but hereby reporting my error before rebuilding my whole Python and OpenCV environment and debugging. As long as I searched around I couldn't find any report like this, but I hope this is a known issue and there's a workaround.

<<<<<
ResultDetail raised a exception >>>>
Traceback (most recent call last):
  File "/Users/kuenishi/src/IkaLog/ikalog/engine.py", line 293, in process_scene
    scene.match(context)
  File "/Users/kuenishi/src/IkaLog/ikalog/scenes/scene.py", line 111, in match
    self._matched = self.match_no_cache(context)
  File "/Users/kuenishi/src/IkaLog/ikalog/scenes/stateful_scene.py", line 36, in match_no_cache
    return self._state(context)
  File "/Users/kuenishi/src/IkaLog/ikalog/scenes/result_detail.py", line 905, in _state_tracking
    self.analyze(context)
  File "/Users/kuenishi/src/IkaLog/ikalog/scenes/result_detail.py", line 757, in analyze
    e = self.analyze_entry(img_entry)
  File "/Users/kuenishi/src/IkaLog/ikalog/scenes/result_detail.py", line 602, in analyze_entry
    img_fes_title = img_name[0:entry_height / 2, :]
TypeError: slice indices must be integers or None or have an __index__ method

<<<<<

My environment on Python and capture device are as follows (built via same procedure as in Wiki except it's just 3.5 instead of 3.4 in the document). And here is my IkaConfig.py.

$ python --version
Python 3.5.3
$ PYTHONPATH=. python  ./IkaLog.py
<class 'ikalog.utils.ikamatcher2.matcher.IkaMatcher2'>: using kernel Numpy_uint8_fast
IkaLog Primary CLI Language: ja_JP.UTF-8 (set LANG to override)
IkaLog Game Language: ja (set IKALOG_LANG to override)
<ikalog.utils.icon_recoginizer.gearpower.GearPowerRecoginizer object at 0x108c18588>: KNN Trained (2410 samples)
<ikalog.inputs.filters.warp_model.WarpFilterModel object at 0x10a7c10b8>: Loaded model data
  /Users/kuenishi/src/IkaLog/data/webcam_calibration.ja.model (3010 keypoints)
<ikalog.inputs.osx.avfoundation_capture.AVFoundationCapture object at 0x10257ef28>: initializing class
2017-01-28 22:19:12.280 Python[94682:1354395] Device[0]: Blackmagic UltraStudio Mini Recorder
2017-01-28 22:19:12.281 Python[94682:1354395] Device[1]: FaceTime HD Camera (Built-in)
<ikalog.inputs.osx.avfoundation_capture.AVFoundationCapture object at 0x10257ef28>: initializing capture device 0
2017-01-28 22:19:18.244 Python[94682:1354395] Seleted capture device: Blackmagic UltraStudio Mini Recorder | uniqueID:61:00000000:003dc200 | modelID:UltraStudio Mini Recorder
<ikalog.outputs.websocket_server.WebSocketServer object at 0x10a7baf60>
<ikalog.outputs.websocket_server.WebSocketServer object at 0x10a7baf60>: Listen port 9090
<ikalog.outputs.websocket_server.WebSocketServer object at 0x10a7baf60>: Started server thread
IkaLog: start.
hasegaw commented 7 years ago

461 should fix the issue