nmoya / whatsapp-parser

Parser to the What's App log file.
MIT License
47 stars 23 forks source link

IndexError: list index out of range #24

Closed riramar closed 6 years ago

riramar commented 6 years ago
# python wp_chat.py -f /abc/xpto.txt -n xpto -p WhatsApp -o xpto.json
Traceback (most recent call last):
  File "wp_chat.py", line 239, in <module>
    main()
  File "wp_chat.py", line 234, in main
    c.all_features(pattern_list=args['regexes'])
  File "wp_chat.py", line 110, in all_features
    self.features.compute_response_time_and_burst(self.messages, self.root, self.senders, initiation_thrs, burst_thrs, response_thrs)
  File "/root/whatsapp-parser/wp_parser/ChatFeatures.py", line 27, in compute_response_time_and_burst
    t0 = list_of_messages[0].datetime_obj
IndexError: list index out of range
nmoya commented 6 years ago

This seems to be a problem in the format of the chat file.

riramar commented 6 years ago

Thanks! I didn't check that. Now I'm using this one https://gist.github.com/tvwerkhoven/6956681fff9100875bb9c08b83cdf55e.