mbox-to-csv icon indicating copy to clipboard operation
mbox-to-csv copied to clipboard

getting an error :TypeError: 'NoneType' object is not subscriptable

Open laithrafid opened this issue 3 years ago • 2 comments

Traceback (most recent call last): File "/Users/laith/Desktop/code/mbox-to-csv/mbox_parser.py", line 115, in date = get_date(email["date"], os.getenv("DATE_FORMAT")) File "/Users/laith/Desktop/code/mbox-to-csv/mbox_parser.py", line 23, in get_date utc_seconds_since_epoch = mktime_tz(time_tuple) File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/_parseaddr.py", line 185, in mktime_tz if data[9] is None: TypeError: 'NoneType' object is not subscriptable

laithrafid avatar Aug 31 '21 15:08 laithrafid

@laithrafid what does your input file look like? I'm guessing you don't have a 10th column

jarrodparkes avatar Sep 01 '21 00:09 jarrodparkes

10th Column my input is myemail.mbox which has all gmail emails in it and i have tried to run your script to get csv file however what happened is: after couple of raws in csv , script exist with error message above .

laithrafid avatar Sep 01 '21 01:09 laithrafid