pytorch / tutorials

PyTorch tutorials.
https://pytorch.org/tutorials/
BSD 3-Clause "New" or "Revised" License
8.21k stars 4.06k forks source link

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

Open levalencia opened 1 year ago

levalencia commented 1 year ago

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

HemanthSai7 commented 1 year ago

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 commented 1 year ago

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