gmail_analyzer icon indicating copy to clipboard operation
gmail_analyzer copied to clipboard

Crash when parsing the mail #4000

Open keram79 opened this issue 5 years ago • 2 comments

I just downloaded and attempted to try gmail_analyzer. After overcoming the credentials.json (not documented here) issue, I could successfully start the python app, but it crashed with a message I'm unable to debug.

I'm running on MacOS Catalina 10.15.2 with Python 3.7.4.

python3 analyzer.py --top 10                                                                                                  
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=661...
* Fetching messages page 614
* Fetching messages meta data  |██                              | 4000/61410Traceback (most recent call last):
  File "analyzer.py", line 39, in <module>
    Metrics(args).start()
  File "/Users/username/gmail_analyzer/src/metrics.py", line 233, in start
    self.processor.get_metadata(messages)
  File "/Users/username/gmail_analyzer/src/processor.py", line 122, in get_metadata
    batch.execute()
  File "/Users/username/.local/share/virtualenvs/gmail_analyzer-o07J9XyI/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/Users/username/.local/share/virtualenvs/gmail_analyzer-o07J9XyI/lib/python3.7/site-packages/googleapiclient/http.py", line 1493, in execute
    callback(request_id, response, exception)
  File "/Users/username/gmail_analyzer/src/processor.py", line 79, in process_message
    "labels": response["labelIds"],
KeyError: 'labelIds'

keram79 avatar Jan 28 '20 18:01 keram79

how to overcome credentials.json?

re4388 avatar Feb 27 '20 14:02 re4388

yes. what is the format of credentials.json ?

DNNhost avatar Mar 31 '20 20:03 DNNhost