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

Strange behaviour of ref counter with ints being 0
self.assertTrue(post.text in response.content) – Assertion Error
How to add a path to sys.path permanently [duplicate]
Copy C structure to Python List
python error:List index out of range
While loop inside for loop?
Serialize multiple models in a single view
Iterating over a list adding attributes to an object in Python [duplicate]
Fourier Transformation vs Numpy FFT
pandas to_html no value representation
Using Pandas To Find the Number Of Periods Since the Rolling High
List Comprehension For Loop + Ternary Operation For Loop?
Pass variable to multiple templates in pybottle
Next and Before Links for a django paginated query
Python - String of Digits to Integer using Recursion?
Weird type error arising when I add to a database using SQL Alchemy

Categories

HOME
xbox-live
ajax
elixir
angular-cli
thunderbird-addon
memory-leaks
playframework
safari
rocketmq
appmaker
snap.svg
yocto
sudo
xcode8.3
currency
google-classroom
uiactivityviewcontroller
getorgchart
ssr
tee
symfony-forms
maxima
cosmicmind
rebol2
alfresco-share
android-toolbar
jcl
ng2-dragula
uiautomator
apple-tv
jflex
widevine
vertex-buffer
vegan
protobuf-net
exponential
hotmail
getline
ifstream
body-parser
ios-ui-automation
hashcat
vmd
coreclr
mongoexport
duktape
jquery-multidatespicker
ttcn
mod-fcgid
archer
livefyre
broadcast
decompress
scd
static-code-analysis
communication-protocol
festival
vst
software-product-lines
aescryptoserviceprovider
database-backups
fps
django-south
mfc-feature-pack
asynccallback
portfolio
connection-reset
castle-windsor-3
manjaro
ytplayerview
cpu-cores
lines-of-code
word-2013
ejabberd-saas
c++-actor-framework
alphablending
gmaps4rails
ultrawingrid
formvalidation-plugin
libssh2
funq
power-law
emma
cppdepend
edit-in-place
.net-cf-3.5
installshield-2011
sharpmap
graph-coloring
fluidsynth
transitive-closure-table
dropdownlistfor
rose-db-object
wchar
msbuildextensionpack
gethashcode
exitstatus
j-interop
external-assemblies
scala-2.8
graniteds
database-diagramming
writing

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