Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAMLParseError: Nested mappings are not allowed in compact mappings #29

Open
SparksIRL opened this issue Nov 2, 2024 · 1 comment · May be fixed by #36
Open

YAMLParseError: Nested mappings are not allowed in compact mappings #29

SparksIRL opened this issue Nov 2, 2024 · 1 comment · May be fixed by #36

Comments

@SparksIRL
Copy link

SparksIRL commented Nov 2, 2024

  asyncretry_error: {
    id: 'op:LLM::GEN',
    error: YAMLParseError: Nested mappings are not allowed in compact mappings at line 13, column 17:

            schema: Array<{ id: string, message: string, type: 'success' | 'error' …
                    ^

        at Composer.onError (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\composer.js:69:34)
        at Object.resolveBlockMap (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\resolve-block-map.js:78:21)
        at resolveCollection (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\compose-collection.js:13:27)
        at Object.composeCollection (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\compose-collection.js:59:16)
        at composeNode (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\compose-node.js:33:38)
        at Object.resolveBlockMap (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\resolve-block-map.js:85:19)
        at resolveCollection (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\compose-collection.js:13:27)
        at Object.composeCollection (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\compose-collection.js:59:16)
        at composeNode (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\compose-node.js:33:38)
        at Object.resolveBlockMap (C:\Users\myusername\cofounder\cofounder\api\node_modules\yaml\dist\compose\resolve-block-map.js:85:19) {
      code: 'BLOCK_AS_IMPLICIT_KEY',
      pos: [ 403, 404 ],
      linePos: [ { line: 13, col: 17 }, { line: 13, col: 18 } ]
    }
  }
}```
Likhithsai2580 added a commit to Likhithsai2580/cofounder that referenced this issue Nov 3, 2024
Fixes raidendotai#29

Fix the YAMLParseError related to nested mappings in compact mappings.

* **Import and Function Call Changes**
  - Update the `yaml` import to use `yaml` instead of `yaml-js`.
  - Modify the `yaml.load` function call to use `yaml.parse`.

* **Schema Field Changes**
  - Ensure the `schema` field does not contain nested mappings.

* **Error Logging**
  - Update the `asyncretry_error` object to correctly log errors without causing nested mappings error.
@SparksIRL
Copy link
Author

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant