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

How to load images and labels to image_data_layer using Python?
Getting the connected components in a graph
Flask hangs after importing pandas (also numpy, matplotlib etc.)
saving pandas dataframe as hdf5
Odoo 9 | search Product by categories in website search
conda 32-bit keep installing 64-bit python 3.5.2
xpath with lxml for Python to get data
passing optional arguments as strings or arays
return value of a function when assigned to variable,adding extra (),in python
Openerp v7 API function field 'one2many' type
Recursion, out of memory?
Fastest Pairwise Difference of Rows
Python uninstalled itself and will not reinstall
Python: How can I create multiple plots for the same function but with different variables?
Can I use Inception (image_retraining in tensorflow) to recognize letters
neo4j get relationship value by python

Categories

HOME
arrays
spring
pug
admin-on-rest
elixir
sed
steam
javamail
apple-numbers
terrain
contact-form-7
octopus-deploy
pjsip
game-physics
cs-cart
uiview
simple-injector
bar-chart
off-canvas-menu
google-openid
zend-framework-mvc
jogl
propel2
flexboxgrid
avplayeritem
explode
profile
delete-file
data-cleansing
geopandas
cgal
hana-studio
red-black-tree
referenceerror
picturebox
read-write
consumer
expand
nlb
npm-publish
vmd
xamarin.uitest
fax
cgo
persistent
nuget-server
fontconfig
typhoon
iostat
windows-azure-pack
audioqueue
update-site
scalar
instruments
gradle-eclipse
kendo-combobox
mongo-c-driver
remoteapp
inet
cmocka
approval-tests
coldfusion-7
optionbutton
lmfit
mysqldumpslow
textkit
python-winshell
visual-studio-code
calibration
rspec3
adobe-indesign
shift-jis
jazz
guzzle6
hiera
uptodate
pl-i
belongs-to
proximity
sysctl
alphablending
cocoascript
livechat
cg
ember-addon
funkload
indexing-service
flash-cc
db4o
pyjade
gamepad
vertical-rhythm
installshield-2009
execvp
entity-framework-4.1
device-emulation
autostart
javascriptserializer
plone-funnelweb
gjs
makefile-project
nsindexpath
opengl-es-lighting
msbuildextensionpack
windows-live-id
chatroom
requestfactory
communicationexception
winverifytrust
callgrind
castle-validators

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