Coder Social home page Coder Social logo

Comments (4)

tomasn4a avatar tomasn4a commented on June 12, 2024 28

I ran into the same error and found this on a PyTorch tutorial. Open the file with encoding 'iso-8859-1':

with open('cornell movie-dialogs corpus/movie_lines.txt', 'r', encoding='iso-8859-1') as f:
    for line in f.readlines():
        sentences[line.split(' +++$+++ ')[0]] = line.split(' +++$+++ ')[-1].replace('\n', "")

from chatbot-startkit.

kareemjeiroudi avatar kareemjeiroudi commented on June 12, 2024 1

Thanx @tomasn4a . It worked!

from chatbot-startkit.

hieucnguyen avatar hieucnguyen commented on June 12, 2024

I have the same error as yours. Have tried many different methods from stackoverflow but the error still remains.

from chatbot-startkit.

khritish29 avatar khritish29 commented on June 12, 2024

hello i am still getting this error
UnicodeDecodeError Traceback (most recent call last)
in ()
----> 1 cleaned_questions, cleaned_answers = clean_data()

1 frames
/content/cornell_data_utils.py in clean_data()
107
108 with open('movie_questions_2.txt', 'r') as f:
--> 109 lines = f.readlines()
110 for line in lines:
111 cleaned_questions.append(cornell_tokenizer(line))

/usr/lib/python3.6/codecs.py in decode(self, input, final)
319 # decode input (taking the buffer into account)
320 data = self.buffer + input
--> 321 (result, consumed) = self._buffer_decode(data, self.errors, final)
322 # keep undecoded input until the next call
323 self.buffer = data[consumed:]

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 1085: invalid start byte

from chatbot-startkit.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.