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

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

Categories

HOME
ember.js
pug
openssl
sed
facebook-graph-api
youtube-livestreaming-api
laravel-5.2
windows-store-apps
travis-ci
search-engine
rocketmq
azureservicebus
value
simpy
ipfs
x-frame-options
uiview
postmessage
rebol2
cloudflare
eclipse-luna
uisplitviewcontroller
ssms-2016
google-openid
ejbca
distance
tweets
url.action
header-files
non-deterministic
opencart2.3
lync-2013
web-frontend
vcard
dhtmlx-scheduler
sharp
outsystems
oracle-xml-db
mapguide
reactivemongo
forecasting
office365connectors
jupyter-console
xbim
tango
lftp
lirc
azureportal
shutdown
bnd
google-maps-ios
httplib2
launch
sqlexception
push-diffusion
try-finally
multiple-file-upload
qregexp
uwp-maps
remoteapp
license-key
difference
enyo
wikitext
mysqldumpslow
p-np
oai
windowlistener
webhdfs
playscape
coypu
jai
inputaccessoryview
proximity
cg
sthttprequest
delphi-xe3
visualstatemanager
resource-files
ruboto
mstsc
fileconveyor
reporting-tools
sametime
dynamic-data
marmalade-edk
tfs-power-tools
die
cookieless
scalaxb
noir
drawtext
msn
winverifytrust
visual-c++-2008-express
openwysiwyg
hmacsha1
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
Mobile App
Mobile App
Mobile App