attachment-downloader icon indicating copy to clipboard operation
attachment-downloader copied to clipboard

ERROR - 'Struct' object has no attribute 'date'

Open hilocz opened this issue 2 years ago • 6 comments

I have latest version and getting on all messages above error.

python-dateutil = 2.8.1-1.24

hilocz avatar Mar 01 '22 23:03 hilocz

Do the logs include anymore information? Can you send me the entire log output?

Thanks

jamesridgway avatar Mar 03 '22 21:03 jamesridgway

When using switch --date-after="2022-03-03T13:00:00" i'm getting this error

Traceback (most recent call last): File "attachment-downloader.py", line 88, in (options, args) = parser.parse_args() File "/usr/lib64/python3.6/optparse.py", line 1387, in parse_args stop = self._process_args(largs, rargs, values) File "/usr/lib64/python3.6/optparse.py", line 1427, in _process_args self._process_long_opt(rargs, values) File "/usr/lib64/python3.6/optparse.py", line 1501, in _process_long_opt option.process(opt, value, values, self) File "/usr/lib64/python3.6/optparse.py", line 779, in process value = self.convert_value(opt, value) File "/usr/lib64/python3.6/optparse.py", line 771, in convert_value return self.check_value(opt, value) File "/usr/lib64/python3.6/optparse.py", line 766, in check_value return checker(self, opt, value) File "attachment-downloader.py", line 18, in valid_date parsed_value = datetime.datetime.fromisoformat(value) AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'

hilocz avatar Mar 03 '22 22:03 hilocz

Without date switch I'm getting this error

2022-03-03 23:11:38,293 - ERROR - 'Struct' object has no attribute 'date' Traceback (most recent call last): File "attachment-downloader.py", line 148, in parsed_message_date = dateparser.parse(message.date) AttributeError: 'Struct' object has no attribute 'date'

hilocz avatar Mar 03 '22 22:03 hilocz

I think this should fix your issue: https://github.com/jamesridgway/attachment-downloader/pull/31

I suspect you may be using Python 3.6 and this should fix the issue. I need to do a new release which I will do shortly.

jamesridgway avatar Mar 05 '22 16:03 jamesridgway

1.2.2 has now been released which should fix this issue

jamesridgway avatar Mar 06 '22 08:03 jamesridgway

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 17 '22 02:10 github-actions[bot]