[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to <undefined>

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.

OCT 5TH 2018 new question to the Google forum
Hello mr naoki thank you for your contributions to the Platform to be able to post questions ...I have a django project and it's slightly different from all django project videos I see on the Net ...I have a docs folder right next to the templates folder. ..in the docs folder I have text files. ...when i update or add text document files in the shell console and I follow all your steps to save and migrate and migrations. .it doesn't add the text file to the docs folder and when i look up the words on my browser page , in a lookfor/search box. just like yours, it only returns the original text files. ..not the text file I added or any modifications i made to the original txt files. .....even though if I go back to the python shell console and I can query the new added text file. .it's there.....how can I solve this? ??....

PS not sure if this is related..as i try to solve this..i cant seem to run a specific module/file in my mainwebapp folder.....the filter_docs.py.....in that file i have  from filter.docs.py import Document..but i will get a module not found filter_docs...so i changed it to from  . models import Document...and i will __main__ not a package....models.py and filter_docs.py are both in mainwebapp folder.......i am trying to run this specific file cuz i think this may solve my docs folder not updating .txt files that i add....in the filter_docs.py i have my functions that parse the words/terms in the docs folder...but it doesnt as i said when i made additions...i do see a line in 2 functions that says...# Run once
    if DocFrequency.objects.all().exists():

so im thinking if i comment out this conditionel.. will it update my additons when i actually go to my website browser and do a lookup or search for terms in my docs folder??

sorry for the long email