octohub / GroupMeAnalytics

A simple Python app that gives insight into your GroupMe conversations.
MIT License
15 stars 23 forks source link

Can never finish compiling. HELP #4

Closed bsauberman closed 5 years ago

bsauberman commented 7 years ago

Hi last year i used this for my group chat and it worked perfectly. But this year when im trying again (the group chat has around 350k messages in it) it doesn't work. And when i try it on group chats with only like 50-100 messages it works perfectly. Please please help me fix it I really want to use it. Thank you (PS it is not a certain message that is screwing it up because it terminates at a different place every time) Around half of the time i got the message:

"Traceback (most recent call last): File "groupme_analytics.py", line 244, in menu() File "groupme_analytics.py", line 19, in menu prepare_analysis_of_group(groups_data, group_id) File "groupme_analytics.py", line 54, in prepare_analysis_of_group user_id_mapped_to_user_data = analyze_group(group_id, user_dictionary, number_of_messages) File "groupme_analytics.py", line 114, in analyze_group name = data['response']['messages'][i]['name'] # grabs name of sender TypeError: 'NoneType' object has no attribute 'getitem' Bens-MBP:GroupMeAnalytics-master bensauberman$ "

while the other half it just freezes with no message

ErikBoesen commented 5 years ago

This is fixed by #6.

SkrumpKing commented 10 months ago

Hello, I'm having a very similar issue to the one described above. The program runs perfectly on smaller groups (couple hundred messages), but fails on my largest group chat. I really appreciate this project btw, it's been a great learning experience for Python. Thank you inadvance!

ErikBoesen commented 10 months ago

@SkrumpKing It's almost impossible to help you without an error message or an explicit description of what you mean by "fails." Could you provide the stack trace you're seeing?

SkrumpKing commented 10 months ago

Yes, I believe I can. Here's the output I get when running the code on a specific group. I am a new developer, so any help you can provide would be awesome!

" 99.99% doneTraceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\Users\User.vscode\analyze.py", line 173, in users = analyze_group(group, users, message_count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\User.vscode\analyze.py", line 40, in analyze_group messages = response.json()['response']['messages'] ^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)"