Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mumail: ValueError: time data does not match format #43

Closed
schvabodka-man opened this issue Dec 28, 2017 · 4 comments
Closed

mumail: ValueError: time data does not match format #43

schvabodka-man opened this issue Dec 28, 2017 · 4 comments

Comments

@schvabodka-man
Copy link

Helo. When running memacs-mumail, i'm getting

ValueError: time data 'Thu 08 Dec 2016 02:33:56 AM EET' does not match format '%c'

and this traceback:

Traceback (most recent call last):
     File "/usr/local/lib/python2.7/dist-packages/memacs/lib/memacs.py", line 187, in handle_main
       self._main()
     File "/usr/local/lib/python2.7/dist-packages/memacs/mu.py", line 116, in _main
       timestamp = self.__getTimestamp(datum)
     File "/usr/local/lib/python2.7/dist-packages/memacs/mu.py", line 71, in __getTimestamp
       mail_date = datetime.strptime(time,"%c")
     File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime
       (data_string, format))
   ValueError: time data 'Thu 08 Dec 2016 02:33:56 AM EET' does not match format '%c'
Traceback (most recent call last):
  File "/usr/local/bin/memacs_mumail.py", line 31, in <module>
    memacs.handle_main()
  File "/usr/local/lib/python2.7/dist-packages/memacs/lib/memacs.py", line 187, in handle_main
    self._main()
  File "/usr/local/lib/python2.7/dist-packages/memacs/mu.py", line 116, in _main
    timestamp = self.__getTimestamp(datum)
  File "/usr/local/lib/python2.7/dist-packages/memacs/mu.py", line 71, in __getTimestamp
    mail_date = datetime.strptime(time,"%c")
  File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime
    (data_string, format))
ValueError: time data 'Thu 08 Dec 2016 02:33:56 AM EET' does not match format '%c'

It's somehow releated to timestamp format(and how can i change it for memacs) or just a bug?

@novoid
Copy link
Owner

novoid commented Dec 29, 2017

Hi, I am the maintainer of Memacs.

The mumail module was not implemented by me and I am not using mumail or this Memacs module. Please write memacs-mumail@m.stennes.org as stated in https://github.com/novoid/Memacs/blob/master/docs/memacs_mumail.org so that he is able to help you with this issue. I'll close the issue when it is solved.

Thanks!

@novoid novoid added the bug label Apr 28, 2018
@novoid
Copy link
Owner

novoid commented Jul 27, 2018

Hi @stvol,

As of https://github.com/novoid/Memacs/commits/master/memacs/mu.py you are the author of the mumail module.

Could you please help @schvabodka-man?

(I'm going to close the issue when we won't find a solution until end of 2018 and I'm going to mark the module unmaintained since I don't use mumail at all.)

@novoid novoid changed the title Troubles with timestamps mumail: ValueError: time data does not match format Oct 3, 2019
@novoid
Copy link
Owner

novoid commented Oct 3, 2019

@schvabodka-man I assume this issue is solved. If you do not report back for confirmation, I'll close this issue soon.

@novoid
Copy link
Owner

novoid commented Oct 9, 2019

I assume that this issue was fixed above. If not, please re-open issue and provide further information. Thanks!

@novoid novoid closed this as completed Oct 9, 2019
novoid pushed a commit that referenced this issue Oct 20, 2019
When the locale is not en_US, the time string will be in another language, and Python's %c can't parse it unless it knows what locale it is.

My changes pick up the system locale.

Also I removed an encode() call that was not needed and was causing problems.

This should even fix issue #43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants