{"action":"created","issue":{"url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/231","labels_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/231/comments","events_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/231/events","html_url":"https://github.com/OfflineIMAP/offlineimap/issues/231","id":103575956,"number":231,"title":"OverflowError: Python int too large to convert to C long","user":{"login":"capi","id":254852,"avatar_url":"https://avatars.githubusercontent.com/u/254852?v=3","gravatar_id":"","url":"https://api.github.com/users/capi","html_url":"https://github.com/capi","followers_url":"https://api.github.com/users/capi/followers","following_url":"https://api.github.com/users/capi/following{/other_user}","gists_url":"https://api.github.com/users/capi/gists{/gist_id}","starred_url":"https://api.github.com/users/capi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capi/subscriptions","organizations_url":"https://api.github.com/users/capi/orgs","repos_url":"https://api.github.com/users/capi/repos","events_url":"https://api.github.com/users/capi/events{/privacy}","received_events_url":"https://api.github.com/users/capi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OfflineIMAP/offlineimap/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-27T19:15:21Z","updated_at":"2015-08-29T09:19:10Z","closed_at":null,"body":"I was trying to backup a very old server of mine, using current `master` branch, on an `Ubuntu 14.04 LTS 32-bit` box with `Python 2.7.6`:\r\n\r\n    Copy message from remote-dpc-carp0001:INBOX:\r\n     ERROR: Copying message 262355 [acc: dpc-carp0001]\r\n      Python int too large to convert to C long\r\n    Thread 'Copy message from remote-dpc-carp0001:INBOX' terminated with exception:\r\n    Traceback (most recent call last):\r\n      File \"/mnt/data/homes/martin/projects-local/offlineimap/offlineimap/threadutil.py\", line 163, in run\r\n        Thread.run(self)\r\n      File \"/usr/lib/python2.7/threading.py\", line 763, in run\r\n        self.__target(*self.__args, **self.__kwargs)\r\n      File \"/mnt/data/homes/martin/projects-local/offlineimap/offlineimap/folder/Base.py\", line 775, in copymessageto\r\n        new_uid = dstfolder.savemessage(uid, message, flags, rtime)\r\n      File \"/mnt/data/homes/martin/projects-local/offlineimap/offlineimap/folder/Maildir.py\", line 355, in savemessage\r\n        os.utime(os.path.join(self.getfullname(), tmpname), (date, date))\r\n    OverflowError: Python int too large to convert to C long\r\n    \r\n    \r\n    Last 3 debug messages logged for Copy message from remote-dpc-carp0001:INBOX prior to exception:\r\n    thread: Register new thread 'Copy message from remote-dpc-carp0001:INBOX' (account 'dpc-carp0001')\r\n    imap: Returned object from fetching 262355: 'Received: from Home-83.pucioasa.optinet.ro (unknown [86.55.83.38])\r\n            by mail.vnet1.dont-panic.cc (Postfix) with ESMTP id 693F0D125\r\n            for <administrative...------=_NextPart_000_0023_7A_2227A1B8.21BBBA1B--\r\n    \r\n    '\r\n    maildir: Write mail 'INBOX:262355' with flags set([])\r\n    ERROR: Exceptions occurred during the run!\r\n    ERROR: Copying message 262355 [acc: dpc-carp0001]\r\n      Python int too large to convert to C long\r\n    \r\n    Traceback:\r\n      File \"/mnt/data/homes/martin/projects-local/offlineimap/offlineimap/folder/Base.py\", line 775, in copymessageto\r\n        new_uid = dstfolder.savemessage(uid, message, flags, rtime)\r\n      File \"/mnt/data/homes/martin/projects-local/offlineimap/offlineimap/folder/Maildir.py\", line 355, in savemessage\r\n        os.utime(os.path.join(self.getfullname(), tmpname), (date, date))\r\n    "},"comment":{"url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/comments/135965689","html_url":"https://github.com/OfflineIMAP/offlineimap/issues/231#issuecomment-135965689","issue_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/231","id":135965689,"user":{"login":"nicolas33","id":90065,"avatar_url":"https://avatars.githubusercontent.com/u/90065?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas33","html_url":"https://github.com/nicolas33","followers_url":"https://api.github.com/users/nicolas33/followers","following_url":"https://api.github.com/users/nicolas33/following{/other_user}","gists_url":"https://api.github.com/users/nicolas33/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas33/subscriptions","organizations_url":"https://api.github.com/users/nicolas33/orgs","repos_url":"https://api.github.com/users/nicolas33/repos","events_url":"https://api.github.com/users/nicolas33/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas33/received_events","type":"User","site_admin":false},"created_at":"2015-08-29T09:19:10Z","updated_at":"2015-08-29T09:19:10Z","body":"On Fri, Aug 28, 2015 at 08:38:21PM -0400, Janna Martl wrote:\n\n> OK, how about this:\n> \n> --------\n\nGit supports scissors line but it must have 8< or >8 like this:\n\n  --->8---\n\nIt will remove everything above. See\nhttps://www.kernel.org/pub/software/scm/git/docs/git-mailinfo.html\n\n,-)\n\n> \n> Handle out-of-bounds dates\n> \n> Handle case where email's internal time is erroneously so large as to\n> cause overflow errors when setting file modification time with\n> utime_from_header = true.\n> \n> Signed-off-by: Janna Martl <janna.martl109@gmail.com>\n> ---\n>  offlineimap/folder/Maildir.py | 16 +++++++++++++---\n>  1 file changed, 13 insertions(+), 3 deletions(-)\n\nPatch looks fine to me. Will merge. Thank you.\n\n-- \nNicolas Sebrecht\n"}}