taksan / Skype2Gmail

Keep skype history in gmail
http://skype2gmail.blogspot.com/
Other
6 stars 2 forks source link

Exception thrown if imap folder does not exist #4

Open glensc opened 12 years ago

glensc commented 12 years ago

IMHO it should create the folder itself, or at least tell what the error is to user, that folder needs to be made manually if this restriction is by design

$ java -jar skype2gmail-1.1-alpha.jar --mail
INFO - Verbose output enabled. To disable edit: 
INFO -    /home/glen/.skype2gmail/config
INFO - and add: verbosity=quiet
INFO - Starting synchronization...
INFO - Will send chat messages to blah@gmail.com
INFO - No sync place holder found for this storage (/home/glen/.skype2gmail/syncs/MailStorage-blah@gmail.com)
INFO - Will send all chats in history.
INFO - Found 318 chats.
INFO - Retrieving skype chat index.
ERROR - skype.ApplicationException: javax.mail.FolderNotFoundException: Skype-Chats not found
INFO - Saving chat index.
Exception in thread "main" skype.ApplicationException: javax.mail.FolderNotFoundException: Skype-Chats not found
    at mail.SkypeGmailStore.getFolder(SkypeGmailStore.java:41)
    at mail.SkypeMailFolderImpl.getSkypeChatFolderEnsuringItIsInitialized(SkypeMailFolderImpl.java:148)
    at mail.SkypeMailFolderImpl.retrieveAllMessagesForSearchTerm(SkypeMailFolderImpl.java:101)
    at mail.SkypeMailFolderImpl.retrieveSingleMessageMatchingSearchTerm(SkypeMailFolderImpl.java:80)
    at mail.SkypeMailFolderImpl.replaceMessageMatchingTerm(SkypeMailFolderImpl.java:114)
    at skype2gmail.IndexedSkypeMailFolder.replaceMessageMatchingTerm(IndexedSkypeMailFolder.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
    at $Proxy9.replaceMessageMatchingTerm(Unknown Source)
    at skype2gmail.FolderIndexImpl.save(FolderIndexImpl.java:94)
    at skype2gmail.IndexedSkypeMailFolder.close(IndexedSkypeMailFolder.java:35)
    at skype2gmail.MailStorage.close(MailStorage.java:59)
    at skype.SkypeRecorder.record(SkypeRecorder.java:48)
    at skype.SkypeHistoryMain.runSkypeModule(SkypeHistoryMain.java:69)
    at skype.SkypeHistoryMain.run(SkypeHistoryMain.java:38)
    at skype.SkypeHistory.main(SkypeHistory.java:15)
Caused by: javax.mail.FolderNotFoundException: Skype-Chats not found
    at com.sun.mail.imap.IMAPFolder.checkExists(IMAPFolder.java:386)
    at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:936)
    at mail.SkypeGmailStore.openFolderOrCreateIfItDoesnExist(SkypeGmailStore.java:70)
    at mail.SkypeGmailStore.retrieveFolder(SkypeGmailStore.java:56)
    at mail.SkypeGmailStore.getFolder(SkypeGmailStore.java:37)
    ... 18 more
taksan commented 12 years ago

Hey

It's nice to see some interest =) Actually, the program was supposed to ensure and create that the folder exists. It's odd that it failed with you. I'll check that. Thanks for the feedback.

glensc commented 12 years ago

yes, it is nice, nicer than python one, or at least more mature, which i spent weekend improving and then found this one just does all that i tried to fix

otoh, what this one seems to have missing: it should split the messages by some idle period, otherwise some chat logs contain 20000 lines, because it's long lived chat :)

also, you could take look at that commit, i as seems this product also can't do well with non-SAID type CHATMSG events

also, would be maybe nice to have html output, similarily from skypelog project, html and css is somewhere here, at least it looked similar to original Skype window on Linux if font set to Verdana