jeremyephron / simplegmail

A simple Gmail API client for applications in Python
MIT License
336 stars 73 forks source link

Error looping through unread messages #92

Open itsnotms opened 1 year ago

itsnotms commented 1 year ago
def mails():

    log("Opening browser window please Log into the account:", "yellow")
    time.sleep(2)

    #Open GMAIL to verify the login
    gmail = Gmail()
    gmail.maxResults = 100 

    log("AUTH DONE!", "success")
    messages = gmail.get_unread_inbox()

    for message in messages:

        if message.subject == "XY":
            log("Found an email to verify")
            print(message.html)

mails()

Results in the following errors :

AttributeError: module 'collections' has no attribute 'Callable' TypeError: can only concatenate list (not "NoneType") to list

I am using Python 3.10.7