pytorch / pytorch/tutorials

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

Open
#2,273 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug question
Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Chatbot Tutorial linked in the issue and reproduce the failure using its Colab Notebook flow. Inspect the downloaded corpus file utterances.jsonl and the loadLinesAndConversations call where JSONDecodeError occurs. Done means the tutorial can process the corpus past this step without the reported unterminated-string error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.