django-mailbox icon indicating copy to clipboard operation
django-mailbox copied to clipboard

unhandled exceptions in admin action get_new_mail

Open misli opened this issue 9 years ago • 6 comments

Exceptions thrown in get_new_mail are not handled.

  1. with wrong url format it throws UnboundLocalError "local variable 'conn' referenced before assignment" in django_mailbox/models.py in get_connection, line 255
  2. with gmail it throws error "[ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)" I know, that I should use django-social-auth, but the exceptions should be nandled anyway

misli avatar Apr 28 '16 12:04 misli

Sounds totally reasonable to me that we might handle that better in the admin; could you file a pull request adding that handling, @misli?

coddingtonbear avatar Apr 28 '16 19:04 coddingtonbear

Was this ever resolved? I'm running into this issue on version 4.5.3 and I wonder if updating to a more recent release would help.

pablodiazgutierrez avatar Mar 29 '17 23:03 pablodiazgutierrez

Nope, @pablodiazgutierrez, but if you posted a PR, you could get this one step closer to being fixed.

coddingtonbear avatar Mar 30 '17 01:03 coddingtonbear

Thanks @coddingtonbear, I'll give it a try. Unfortunately I'm only getting this error on my production server, which is no playground... :)

pablodiazgutierrez avatar Mar 30 '17 01:03 pablodiazgutierrez

Let me know if you need any help; the problem above is mostly one of how an error is reported rather than being about actually fixing the error. If what you're attempting to fix is the underlying problem, @pablodiazgutierrez, you might just want to just double-check that a proper URI is entered for your mailbox (the first of the above problems), or have a look at your logs to see if you can find an indication of another error (like the second of the above problems).

coddingtonbear avatar Mar 30 '17 01:03 coddingtonbear

this post is old but i'm using django-mailbox 4.8.1 and my problem is admin action get_new_mail not working but from the shell it is working and i don't have any error.

Lifechess avatar Aug 02 '20 03:08 Lifechess

I guess it has been fixed at some point, maybe in this commit. @Lifechess Could you retry with the newly released 4.9.0?

pfouque avatar Dec 17 '23 07:12 pfouque