tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

[BUG] - Chatbot Tutorial - Unterminated string starting at: line 1 column 91 (char 90)

Open levalencia opened this issue 2 years ago • 3 comments

Add Link

https://pytorch.org/tutorials/beginner/chatbot_tutorial.html#chatbot-tutorial

Describe the bug

I downloaded the zip and extracted it.

Now I got this error:

Processing corpus into lines and conversations...
---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
[<ipython-input-14-0fd208236945>](https://localhost:8080/#) in <module>
     11 # Load lines and conversations
     12 print("\nProcessing corpus into lines and conversations...")
---> 13 lines, conversations = loadLinesAndConversations(os.path.join(corpus, "utterances.jsonl"))
     14 
     15 # Write new csv file

3 frames
[/usr/lib/python3.9/json/decoder.py](https://localhost:8080/#) in raw_decode(self, s, idx)
    351         """
    352         try:
--> 353             obj, end = self.scan_once(s, idx)
    354         except StopIteration as err:
    355             raise JSONDecodeError("Expecting value", s, err.value) from None

JSONDecodeError: Unterminated string starting at: line 1 column 91 (char 90)

On this line: lines, conversations = loadLinesAndConversations(os.path.join(corpus, "utterances.jsonl"))

Describe your environment

I just clicked on the Collab Notebook button and ran it

levalencia avatar Mar 28 '23 21:03 levalencia

I think the utterances.json1 file is missing a closing quotation mark in the error line. Maybe it can be fixed by adding the quotation mark and saving it.

HemanthSai7 avatar Jun 01 '23 05:06 HemanthSai7

Hello, I think they have fixed the dataset since I ran the code without any issues.

HemanthSai7 avatar Jun 08 '23 18:06 HemanthSai7