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 Multiprocessing does not wait
SqlAlchemy and PostgreSql datetime update
How do I use SQLalchemy to treat an existing select object as a view?
Deducting the median from each column
How to correctly instance a IPython cluster made of local and remote machines
Pandas: Efficient way to get first row with element that is smaller than a given value
Repeat function python
Code for -Python plot
How can I use a variable value to call a dataframe?
how to post multiple value with same key in python requests?
Encryption decryption of natural language model
How to streamline using bash when always using the same tabs in a project?
Python socket.close() does not work until the script exit
Is this a Pandas bug with notnull() or a fundamental misunderstanding on my part (probably misunderstanding)
KeyError stopping App in kivy
how to run an individual test in python unittest

Categories

HOME
visual-studio-2015
vb6
rotation
warnings
paramiko
wxwidgets
parse-server
orientation
phonegap-cli
branch.io
spring-cloud-contract
powershell-v3.0
nixos
uiview
medium-editor
bootstrap-popover
grub2
aptana
device-detection
kadanes-algorithm
esql
epicor
searchbar
jflex
tampermonkey
dd-wrt
picturebox
consumer
stocks
pdflatex
mapguide
broadleaf-commerce
sonarqube-scan
meta-raspberrypi
active-model-serializers
agent
intellilock
g1gc
spring-bean
upsert
ivona
asmx
taskmanager
mouseclick-event
persistent
instruction-set
emgu
build-process
ebtables
spring-ioc
cron-task
gitweb
listadapter
search-regex
throughput
android-cursoradapter
persistence.xml
intellitest
evo
playscape
apache-mina
musl
google-earth-plugin
kendo-mvvm
omnifocus
dto
code-testing
boost-test
neoload
jstack
sim900
logentries
modeshape
.net-cf-3.5
nimrod
xslkey
appfog
mozart-mvc
makefile-project
emacs23
serp
executable-format
windows-live-id
zend-form-element
trampolines
odbc-sql-server-driver

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