Skip to content

SyntaxError: Unterminated string in JSON  #190

@petrastegaev

Description

@petrastegaev

Describe the issue
Getting SyntaxError: Unterminated string in JSON

Version details
AutoPilot version tested: f1b706c

Node version: (node --version) (node 18 and above are supported)
Node.js v20.10.0

Task input
node ui -t Create comments for every class and method describing functionality and dataflow

Logs
/node_modules/langchain/dist/output_parsers/structured.cjs:74
throw new index_js_1.OutputParserException(Failed to parse. Text: ${text}. Error: ${e});
^

OutputParserException [Error]: Failed to parse. Text: ```json
{
"thoughts": {
"text": "The code is a Java class that represents LaneData in a software system. It contains various properties and methods for managing lane data. The code seems to be well-structured and follows standard Java conventions.",
"reasoning": "I have analyzed the code and understand its purpose and structure.",
"criticism": ""
},
"output": [
{
"fileToUpdate": "LaneData.java",
"content": "package cconfigurationData;\n\nimport c Error: SyntaxError: Unterminated string in JSON at position 833
at StructuredOutputParser.parse (/home/petr/IdeaProjects/autopilot/node_modules/langchain/dist/output_parsers/structured.cjs:74:19)
at OutputFixingParser.parse (/home/petr/IdeaProjects/autopilot/node_modules/langchain/dist/output_parsers/fix.cjs:43:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async suggestChanges (/home/petr/IdeaProjects/autopilot/agents/coder.js:79:22)
at async runAgent (/home/petr/IdeaProjects/autopilot/modules/interactiveAgent.js:15:12)
at async /home/petr/IdeaProjects/autopilot/ui.js:125:24
at async Promise.all (index 32)
at async main (/home/petr/IdeaProjects/autopilot/ui.js:122:3)

Expected behavior
Task finishes succeasfully and updates files

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions