MasterScrat/Chatistics

Language detection error when parsing messenger data

sshazril opened this issue · 1 comments

Am new to all this but am running into a problem when parsing my messenger data.
An exception gets thrown by lang detect when parsing the messages and leads to messages not being parsed.

Have included the log below to hopefully help -

2020-04-16 16:20:53,401 [INFO ] [parsers.mess]: Detecting languages...
Traceback (most recent call last):
File "parse.py", line 84, in
ArgParse()
File "parse.py", line 42, in init
getattr(self, args.command)()
File "parse.py", line 69, in messenger
main(args.own_name, args.file_path, args.max)
File "C:\Users\User\source\repos\Chatistics-master\parsers\messenger.py", line 31, in main
df = detect_language(df)
File "C:\Users\User\source\repos\Chatistics-master\parsers\utils.py", line 24, in detect_language
lang = langdetect.detect(text)
File "C:\Users\User\Anaconda3\lib\site-packages\langdetect\detector_factory.py", line 130, in detect
return detector.detect()
File "C:\Users\User\Anaconda3\lib\site-packages\langdetect\detector.py", line 136, in detect
probabilities = self.get_probabilities()
File "C:\Users\User\Anaconda3\lib\site-packages\langdetect\detector.py", line 143, in get_probabilities
self._detect_block()
File "C:\Users\User\Anaconda3\lib\site-packages\langdetect\detector.py", line 150, in _detect_block
raise LangDetectException(ErrorCode.CantDetectError, 'No features in text.')
langdetect.lang_detect_exception.LangDetectException: No features in text.

Thanks for your report! Let me know if the problem persists!