☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Error with UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 1: invalid continuat

Community Support
okiror_jethro
okiror_jethro

I am using python 3.4 version and i have this code but i am trying to figure out how to solve this error.

import pandas as pd

pop = pd.read_csv(“C:/Users/Dell@GL\Desktop/Projects Prototypes/POP.csv”, index_col = 0)

print(pop)

I am receiving this error.

UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xf4 in position 1: invalid continuat

File “pandas\parser.pyx”, line 766, in pandas.parser.TextReader.read (pandas\parser.c:7988)

⌁   Link to post
Bryan
Bryan

Hi,

This appears to be an issue with the Pandas library, not with Bokeh. You will have to contact the Pandas team for assistance, the main Pandas site is here:

  http://pandas.pydata.org/

And has links to mailing lists, issue trackers, etc.

Thanks,

Bryan

···

On Mar 28, 2016, at 1:29 PM, okiror jethro <okirorjef@gmail.com> wrote:

I am using python 3.4 version and i have this code but i am trying to figure out how to solve this error.

import pandas as pd

pop = pd.read_csv("C:/Users/Dell@GL\Desktop/Projects Prototypes/POP.csv", index_col = 0)

print(pop)

I am receiving this error.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 1: invalid continuat

File "pandas\parser.pyx", line 766, in pandas.parser.TextReader.read (pandas\parser.c:7988)

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/c1cc0153-e93b-4ee0-b2e9-eb40965b864e%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
delonbest
delonbest

Unicode String types are a handy Python feature that allows you to decode encoded Strings and forget about the encoding until you need to write or transmit the data. Python tries to convert a byte-array (a bytes which it assumes to be a utf-8-encoded string) to a unicode string (str). This process of course is a decoding according to utf-8 rules. When it tries this, it encounters a python byte sequence which is not allowed in utf-8-encoded strings (namely this 0xff at position 0). One simple way to avoid this error is to encode such strings with encode() function as follows (if a is the string with non-ascii character):

a.encode('utf-8').strip()

Or

Use encoding format ISO-8859-1 to solve the issue.

⌁   Link to post

End of archived discussion · Replies are disabled