I have been using urllib.request.openurl for over a year. I would run my code either in spyder or on the Anaconda Prompt page. Reading online suggested converting to urllib3. I did and it works fine in spyder. But on the Anaconda Prompt window, import urllib3 fails. Here is the message it gives me.
Connection Object : <imaplib.IMAP4_SSL object at 0x000002322150B710>
Total Time Taken : 0.33 Seconds
Logging into mailbox…
ErrorType : error, Error : b’[ALERT] Application-specific password required: Sign in with app passwords - Google Account Help (Failure)’
Response Code : None
Traceback (most recent call last):
File “C:\Users\MackE\Documents\Medev\Python\MyBot.py”, line 3, in
import urllib3
File “C:\Users\MackE\anaconda3\Lib\site-packages\urllib3_init_.py”, line 14, in
from . import exceptions
File “C:\Users\MackE\anaconda3\Lib\site-packages\urllib3\exceptions.py”, line 6, in
from email.errors import MessageDefect
File “C:\Users\MackE\Documents\Medev\Python\email.py”, line 36, in
print(“Response : {}\n”.format(response[0].decode()))
~~~~~~~~^^^
TypeError: ‘NoneType’ object is not subscriptable
Any information about why it would execute in spyder but not on the Anaconda Prompt page and how to import urllib3 from the Anaconda Prompt page would be appreciated.
Regards,
Mack Elrod