UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to <undefined>
pjmclenon at gmail.com
pjmclenon at gmail.com
Mon Oct 15 12:00:47 EDT 2018
On Saturday, October 13, 2018 at 7:24:14 PM UTC-4, MRAB wrote:
> On 2018-10-14 00:13, pjmclenon at gmail.com wrote:
> > On Wednesday, June 13, 2018 at 7:14:06 AM UTC-4, INADA Naoki wrote:
> >> > 1st is this script is from a library module online open source
> >>
> >> If it's open source, why didn't you show the link to the soruce?
> >> I assume your code is this:
> >>
> >> https://github.com/siddharth2010/String-Search/blob/6770c7a1e811a5d812e7f9f7c5c83a12e5b28877/createIndex.py
> >>
> >> And self.collFile is opened here:
> >>
> >> https://github.com/siddharth2010/String-Search/blob/6770c7a1e811a5d812e7f9f7c5c83a12e5b28877/createIndex.py#L91
> >>
> >> You need to add `encoding='utf-8'` argument.
> >
> >
> >
> > hello i used this recommandtion in one of my projects in python and it worked fine im wrting today cuz i have this same unicode error in a slighty differn file code line and i added encoding utf 8 but i still get the same error
> >
> > here is my line of code
> >
> > with open(join("docs", path)) as f:
> >
> > where can i add the encoding="utf8" line??
> > does anyone on this forum happen to know??
> >
> > ok thank you jessica
> >
> with open(join("docs", path), encoding="utf-8") as f:
THANK you very much
that works
i had forgot a comma , thats what gave me the error
thaxz again
Jesiica
More information about the Python-list
mailing list