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

sign in issue #14

Open
lokesh1233 opened this issue Aug 5, 2017 · 8 comments
Open

sign in issue #14

lokesh1233 opened this issue Aug 5, 2017 · 8 comments

Comments

@lokesh1233
Copy link

it is showing only sign in multiple times in console

Sign In ...
Sign In ...

@gabemarshall
Copy link

Same here.. were you ever able to figure out the issue?

@fhamidkhan
Copy link

Same here, it loops and only shows sign in.

@rtruxal
Copy link

rtruxal commented Nov 8, 2017

K so I just found this, experienced the same thing, but do not have time to dig into imaplib library. Hopfully putting a finger on the issue will help someone else fix it. See the below description + inline comments.

What everyone here is experiencing happens b/w lines 17-30. An exception is getting thrown...:

def login(self, username, password):
        self.username = username
        self.password = password
        while True:
            try:
                #########################
                #  RIGHT IN HERE SOMEWHERE.
                self.imap = imaplib.IMAP4_SSL(config.imap_server,config.imap_port)
                r, d = self.imap.login(username, password)
                assert r == 'OK', 'login failed'
                print(" > Sign as ", d)
                #########################
            except: # <=======CAUSING THIS TO CATCH,
                print(" > Sign In ...")
                continue # <====FOREVER
            # self.imap.logout()
            break

@ghandic
Copy link

ghandic commented Jan 15, 2018

Try adding a shbang to the config file eg:

#!/usr/bin/env python
imap_server = "imap-mail.outlook.com"
imap_port = 993
smtp_server = "smtp-mail.outlook.com"
smtp_port = 587

@dwightyy
Copy link

I'm with the same problem.. I'am trying to use via cloud9 in my workplace and it gave me this loop, but when i tried at home in Ubuntu 16 it worked normally.

@princeatul
Copy link

It is also giving me the "Sign in" loop. I also tried it on a different network and still getting the same issue.
I am trying it on a windows system.

@mcast123
Copy link

I just copied the config data to the main file and changed the references. It's working fine now!

@rtruxal
Copy link

rtruxal commented Jun 22, 2018

Comments from @mcast123 and @ghandic fixed my problem.

imap_server & imap_port were throwing NameErrors, meaning the env-variables shown in @ghandic's post weren't accessible to the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants