Closed Zengpr closed 5 years ago
Can you please provide a sample file so we can reproduce the error and fix it? Also, can you tell us whether you're parsing the submissions or the comments?
Thank you.
The problem can be solved by installing version 1.0 of emot. I think you have installed the latest version. Hope this helps.
Subreddit whitelist provided with size 95 Error occurred at 11: string indices must be integers Traceback (most recent call last): File "corpora/reddit/reddit_parser.py", line 473, in
parse(submissions_input, params, _convert_submission_to_post)
File "corpora/reddit/reddit_parser.py", line 305, in parse
raise e
File "corpora/reddit/reddit_parser.py", line 256, in parse
normalized_text = normalize_post_text(post.text, charmap)
File "corpora/reddit/reddit_parser.py", line 136, in normalize_post_text
normalized = strip_emojis_and_emoticons(normalized).strip()
File "/home/zengpr/open/PycharmProjects/2019-01/THRED-master/util/nlp.py", line 144, in strip_emojis_and_emoticons
return _strip_emoticons(_strip_emojis(text))
File "/home/zengpr/open/PycharmProjects/2019-01/THRED-master/util/nlp.py", line 166, in _strip_emoticons
emoticon = em['value']
TypeError: string indices must be integers