Comments (4)
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.
Thanx @tomasn4a . It worked!
from chatbot-startkit.
I have the same error as yours. Have tried many different methods from stackoverflow but the error still remains.
from chatbot-startkit.
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)
- TypeError: 'NoneType' object is not iterable HOT 1
- can't sample chat. HOT 3
- How to test the Saved model. HOT 14
- Indentation Error HOT 4
- Indentation Error ! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatbot-startkit.