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

boto3 changing AWS ec2 instance state
Inputing date using Selenium/Python does not work
Opening IDLE from Terminal
IP proto field number to string
Setting all dictionary elements to 0 python
Translate curl to python [duplicate]
Setting Values Of Inherited Properties
How do I make pip install binaries to a writable path?
TensorFlow: generating a random constant
How can I organize my functions to get something like class.draw.line() instead of class.drawLine
Traceback (most recent call last): (works in trinket.io but not 3.4/2.7.11)
python : Mode of a List
How to send and receive data from flask?
Python HTTPS Login to account to scrape data, is this bad practice?
Celery, redis and ConnectionPool
Numpy Choose Elements from 2 arrays

Categories

HOME
sql-server
dotnetrdf
google-cloud-bigtable
signalr
websphere
angular-cli
vs-team-services
sbt-assembly
orientation
hyperledger-fabric
snap.svg
urlencode
avl-tree
data-analysis
phoenix
typeahead
riak
riak-ts
saiku
google-openid
nsmenuitem
tcpclient
iup
cronet
samsung-mobile
tampermonkey
switching
osmdroid
lync-2013
spring-data-neo4j
nesc
bxslider
sharp
rowcount
protobuf-net
clockwork
viewstate
precedence
css-counter
rider
bing-maps-api
text-files
forecasting
android-download-manager
alchemy.js
soundjs
lexical-analysis
wsadmin
stdclass
pdftk
homekit
3scale
chunked-encoding
nstouchbar
jexl
paas
communication-protocol
date-range
ingres
iron.io
shinyjs
dts
instruments
linkageerror
clob
asynccallback
git-rebase
spservices
license-key
pyrocms
urn
risk-analysis
leadtools-sdk
swift2.1
chaining
jcr-sql2
hidden-field
x-ua-compatible
jstat
picat
android-looper
kraken.js
sqljdbc
angulartics
goinstant
threadx
ienumerator
backbone-relational
wpdb
sequelpro
pitch
moq-3
static-variables
objective-c-protocol
wchar
ou
squeel
visual-studio-2010-beta-2
standardized

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