pointer-generator
pointer-generator copied to clipboard
Error while processing input File "/home/sawan/Downloads/Pointer_Network_Data/pointer-generator-master/data.py", line 235, in abstract2sents start_p = abstract.index(SENTENCE_START, cur) TypeError: a bytes-like object is required, not 'str'
Please put the error message in a comment instead, it's unreadable as a title.
Solution: add these code in batcher.py
======== before ==============
def fill_example_queue(self):
input_gen = self.text_generator(data.example_generator(self._data_path, self._single_pass))
while True:
try:
(article, abstract) = next(input_gen)
========after================
def fill_example_queue(self):
input_gen = self.text_generator(data.example_generator(self._data_path, self._single_pass))
while True:
try:
(article, abstract) = next(input_gen)
article = article.decode("utf-8")
abstract = abstract.decode("utf-8")