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

Find out Python version from source code (or Heroku)
Recursive Function named Power
415 error when uploading to API
How to interfacing
Collision detection with PyGame
Why is Python not setting up my cron job's time properly?[Solved]
Training Data Set in NLTK Python
Pip3 packages can't be found/used by the terminal
No recipients have been added when trying to send message with Flask-Mail
Get 503 response code from youtube, when scraping comments with python
Pip can't upgrade a built-in package in ubuntu 15.04
PyRun_SimpleString is blocking whenever import is used, never returns
What is the purpose of setuptools requirements of the form “package===version”
Django admin site not opening while running from pydev in eclipse
WebdriverWait is showing TimeoutException, if i use sleep.time it works ok
Python: Create Array from Indexed List

Categories

HOME
reverse-engineering
jsviews
wildcard
nuxeo
ocaml
agile
jbehave
playframework
matplotlib
appmaker
gimp
slim-3
google-plus
pjsip
gatsby
cs-cart
cratedb
alfresco-share
pyyaml
saiku
internet-explorer-8
ejbca
prediction
nsmenuitem
spring-test
logarithm
printdocument
helper
dpi
forum
sharp
jackson-dataformat-csv
node-horseman
viewstate
shibboleth
readfile
topic-modeling
react-native-router-flux
jrules
html-agility-pack
median
persistent
etherpad
date-range
lotus
atlassian-crowd
spark-cassandra-connector
nofollow
linkageerror
asteriskami
amf
emokit
freefem++
distribute
difference
loose-typing
self-hosting
eyeql
p-np
visual-studio-code
rx-groovy
ytplayerview
digits
adobe-indesign
google-plus-one
hg-git
lexicographic
odftoolkit
node-imagemagick
docopt
libssh2
ifft
joox
baucis
windows-mobile-6
trimming
gdataxml
enumerators
static-variables
getstring
windows-phone-7-emulator
visual-web-gui
surf
goliath
paintcomponent
smooth
server-error
dashcode
nagle
yajl
file-encodings
windows-controls
microsoft.ink
document-library
cots

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
Mobile App
Mobile App
Mobile App