image


UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte when reading an image


when l try to read an image as follow
with open('/home/image/482_PARTERRE_55682.jpg', 'r') as f:
imagebin=f.read()
l get the following error :
Traceback (most recent call last):
File "<input>", line 2, in <module>
File "/home/vincent/anaconda3/envs/my_env/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
l don't understand my error.
with open('/home/image/482_PARTERRE_55682.jpg', 'rb') as f:
imagebin=f.read()

Related Links

How do I insert multiple non-overlapping images using openpyxl?
How do I force Kubernetes to re-pull an image?
How does conversion of a raster image to a vector image work, and could it be used in image processing
MATLAB: Set points within plot polygon equal to zero
Where are image streams stored in OpenShift?
How do I add an imshow option when right clicking on an item in MATLAB workspace?
Go base64 image decode
Images from Assets Folder are not working in UWP app
How to bind image with BitmapImage in windows phone 8?
QML/QtQuick2 Anchor Item to static location on a scaled image
Is it more efficient to print a large image less times, or a small image more times?
Write from http request to jpg directly
Create a Halide::Image object from an existing double C++ array
What deletes docker images periodically?
NGINX: Rewrite image location
Writing to /dev/loop USB image?

Categories

HOME
openlayers
bluetooth
coq
webpack
plone
sd-card
bpmn
spagobi
read-eval-print-loop
yarn
paw-app
frameworks
binary-tree
cross-browser
webrequest
esper
slurm
gorm
n-gram
workload-scheduler
apache-metamodel
reactcsstransitiongroup
karma-jasmine
lldb
conemu
java-3d
abi
tokenize
excel-2007
angular2-aot
su
fifo
spring-mybatis
lightswitch-2013
key-value-observing
create-table
siesta-swift
karaf
http-get
ios5
appfabric
mixture-model
ssjs
angularjs-factory
trim
powershell-dsc
businessworks
google-datalayer
flickr-api
fault
jedis
prolog-setof
mplayer
spring-mongodb
topbeat
parallel-data-warehouse
visual-c++-2008
removechild
elements
skype4py
bgp
php-internals
itextpdf
freelancer.com-api
separator
maven-tomcat-plugin
cannon.js
python-3.2
libressl
jqgrid-formatter
computer-algebra-systems
security-testing
sframe
service-accounts
sysinternals
nsight
oberon
proj4js
bridge.net
modalpopup
codeigniter-url
java.util.concurrent
nsbutton
asp.net-web-api-odata
device-manager
zend-route
elliptic-curve
expected-exception
hyprlinkr
app42
ms-project-server-2010
dbconnection
batterylevel
pygit2
dmoz
google-email-migration
objective-c-2.0
uiviewanimation-curve
bigcouch
cufon
gnu-prolog
iphone-web-app
dentrix
vc90
webkit.net
microsoft-virtualization
commodore

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile