python


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()

Related Links

Index class as list and as dictionary
Python “will the arrow fly straight program”
Processing an eventlog with Pandas - find next match in DataFrame
Intellij python plugin debugging the script copied under the target directory
Create a list with repeated values with list comprehension
Is LASSO regression implemented in Statsmodels?
There is a duplicate line showed when calling a __init__ in Python script
trouble with mousewheel + scrollbars in tkinter
Python Cutting a string on a certain point
Ansible become_user error UnicodeEncodeError: 'ascii' codec can't encode character
Dynamic way to create new columns as a function of existing columns in pandas
polymorphic dispatch: distinguishing Python integers vs. floating-point numbers vs. strings
HTCondor output files: obtain created directory
getting select values with flask [duplicate]
Tensorflow tf.matmul example is incorrect?
drawing flower with python turtle

Categories

HOME
sas
security
sass
ubuntu-16.04
aem
qpython3
amazon-product-api
mainframe
sbt-assembly
value
nodemailer
gimp
openwrt
aruco
google-shopping
camera-calibration
gatsby
abcpdf
cpanel
ng-show
google-people
kadanes-algorithm
ng2-dragula
embedly
extractor
activepython
skmaps
rhmap
solidworks
piecewise
consumer
idl
freebase
ifstream
receipt
threshold
magiczoomplus
linq-to-entities
ivona
facebook-chatbot
asmx
openweathermap
nsjsonserialization
ti-basic
gauss
gist
slot
garrys-mod
pdfkit
rsqlite
gradle-script-kotlin
hspec
rmongodb
children
nofollow
asteriskami
achievements
financial
usb-drive
magento-1.4
portfolio
license-key
datainputstream
eyeql
site-prism
wif
xjc
lines-of-code
adobe-indesign
stackframe
word-2013
microblaze
ibmsbt
ghostdoc
smartystreets
late-static-binding
zipalign
resource-files
crystal-reports-10
goinstant
dig
zend-lucene
vt100
snapjs
lync-server-2010
attachevent
moq-3
sunspot-rails
legacy-code
z-machine
mysql-error-1045
rijndael
osx-leopard
hadoop-plugins
outlook-form
usergroups

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html