Unicode Encode Error while using mechanize to log in to website
I am using mechanize to log into website https://www.patientslikeme.com but I get the error: UnicodeEncodeError: 'ascii' codec can't encode character u'\u2713' in position 0: ordinal not in range(128). Please reply how can this be resolved. Code: import mechanize import cookielib br = mechanize.Browser() br.set_handle_robots( False ) cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) br.addheaders = [('User-agent', 'Firefox')] br.open('https://www.patientslikeme.com/users/sign_in') br.select_form( nr=1) br['user[email_or_login]'] = 'divyat' br['user[password]']= 'nothing' logged_in= br.submit() logincheck= logged_in.read() Error is caused by the line logged_in= br.submit()
Python importing files - for loops
How to avoid docstring duplication
python script is not executed via crontab
Pandas dataframe.to_csv() returns each row in quotes
Avoiding Stack Overflow in Python 3. Advice needed
ld cannot find .so libraries
Converting multi-line String to Dict in Python
passing structure from c++ to python
MySQL string replace using SQLAlchemy
How to copy an image from server directory to another directory in python
Python Selenium click on a specific row in a table containing the right data in a column
How to run different methods on strings through a variable?
Why does order of comparison matter for this apply/lambda inequality?
python returning to the default statement
How can 2 objects be considered not equal and not identicial by Python, but have the same id?
No post request after submitting a form when I want to download a PDF