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

Failed to parse pyproject.toml #9412

Closed
CandiedCode opened this issue Nov 7, 2024 · 2 comments
Closed

Failed to parse pyproject.toml #9412

CandiedCode opened this issue Nov 7, 2024 · 2 comments
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@CandiedCode
Copy link

Upgrading from pyright 1.1.386 to 1.1.387 causes pyright to fail due to parsing issues with our pyproject.toml

Pyproject file parse attempt 1 error: {"name":"SyntaxParseError","errors":[{"offset":9943,"line":409,"column":18,"length":16,"message":"unexpected character: ->\"<- at offset: 9943, skipped 16 characters."},{"offset":9960,"line":409,"column":35,"length":2,"message":"unexpected character: ->\ud83d<- at offset: 9960, skipped 2 characters."},{"offset":9972,"line":409,"column":47,"length":4,"message":"unexpected character: ->\\<- at offset: 9972, skipped 4 characters."},{"offset":9977,"line":409,"column":52,"length":4,"message":"unexpected character: ->s<- at offset: 9977, skipped 4 characters."},{"offset":9982,"line":409,"column":57,"length":2,"message":"unexpected character: ->c<- at offset: 9982, skipped 2 characters."},{"offset":9985,"line":409,"column":60,"length":1,"message":"unexpected character: ->\"<- at offset: 9985, skipped 1 characters."}]}
Pyproject file parse attempt 2 error: {"name":"SyntaxParseError","errors":[{"offset":9943,"line":409,"column":18,"length":16,"message":"unexpected character: ->\"<- at offset: 9943, skipped 16 characters."},{"offset":9960,"line":409,"column":35,"length":2,"message":"unexpected character: ->\ud83d<- at offset: 9960, skipped 2 characters."},{"offset":9972,"line":409,"column":47,"length":4,"message":"unexpected character: ->\\<- at offset: 9972, skipped 4 characters."},{"offset":9977,"line":409,"column":52,"length":4,"message":"unexpected character: ->s<- at offset: 9977, skipped 4 characters."},{"offset":9982,"line":409,"column":57,"length":2,"message":"unexpected character: ->c<- at offset: 9982, skipped 2 characters."},{"offset":9985,"line":409,"column":60,"length":1,"message":"unexpected character: ->\"<- at offset: 9985, skipped 1 characters."}]}
Pyproject file parse attempt 3 error: {"name":"SyntaxParseError","errors":[{"offset":9943,"line":409,"column":18,"length":16,"message":"unexpected character: ->\"<- at offset: 9943, skipped 16 characters."},{"offset":9960,"line":409,"column":35,"length":2,"message":"unexpected character: ->\ud83d<- at offset: 9960, skipped 2 characters."},{"offset":9972,"line":409,"column":47,"length":4,"message":"unexpected character: ->\\<- at offset: 9972, skipped 4 characters."},{"offset":9977,"line":409,"column":52,"length":4,"message":"unexpected character: ->s<- at offset: 9977, skipped 4 characters."},{"offset":9982,"line":409,"column":57,"length":2,"message":"unexpected character: ->c<- at offset: 9982, skipped 2 characters."},{"offset":9985,"line":409,"column":60,"length":1,"message":"unexpected character: ->\"<- at offset: 9985, skipped 1 characters."}]}
Pyproject file parse attempt 4 error: {"name":"SyntaxParseError","errors":[{"offset":9943,"line":409,"column":18,"length":16,"message":"unexpected character: ->\"<- at offset: 9943, skipped 16 characters."},{"offset":9960,"line":409,"column":35,"length":2,"message":"unexpected character: ->\ud83d<- at offset: 9960, skipped 2 characters."},{"offset":9972,"line":409,"column":47,"length":4,"message":"unexpected character: ->\\<- at offset: 9972, skipped 4 characters."},{"offset":9977,"line":409,"column":52,"length":4,"message":"unexpected character: ->s<- at offset: 9977, skipped 4 characters."},{"offset":9982,"line":409,"column":57,"length":2,"message":"unexpected character: ->c<- at offset: 9982, skipped 2 characters."},{"offset":9985,"line":409,"column":60,"length":1,"message":"unexpected character: ->\"<- at offset: 9985, skipped 1 characters."}]}
Pyproject file parse attempt 5 error: {"name":"SyntaxParseError","errors":[{"offset":9943,"line":409,"column":18,"length":16,"message":"unexpected character: ->\"<- at offset: 9943, skipped 16 characters."},{"offset":9960,"line":409,"column":35,"length":2,"message":"unexpected character: ->\ud83d<- at offset: 9960, skipped 2 characters."},{"offset":9972,"line":409,"column":47,"length":4,"message":"unexpected character: ->\\<- at offset: 9972, skipped 4 characters."},{"offset":9977,"line":409,"column":52,"length":4,"message":"unexpected character: ->s<- at offset: 9977, skipped 4 characters."},{"offset":9982,"line":409,"column":57,"length":2,"message":"unexpected character: ->c<- at offset: 9982, skipped 2 characters."},{"offset":9985,"line":409,"column":60,"length":1,"message":"unexpected character: ->\"<- at offset: 9985, skipped 1 characters."}]}
Pyproject file parse attempt 6 error: {"name":"SyntaxParseError","errors":[{"offset":9943,"line":409,"column":18,"length":16,"message":"unexpected character: ->\"<- at offset: 9943, skipped 16 characters."},{"offset":9960,"line":409,"column":35,"length":2,"message":"unexpected character: ->\ud83d<- at offset: 9960, skipped 2 characters."},{"offset":9972,"line":409,"column":47,"length":4,"message":"unexpected character: ->\\<- at offset: 9972, skipped 4 characters."},{"offset":9977,"line":409,"column":52,"length":4,"message":"unexpected character: ->s<- at offset: 9977, skipped 4 characters."},{"offset":9982,"line":409,"column":57,"length":2,"message":"unexpected character: ->c<- at offset: 9982, skipped 2 characters."},{"offset":9985,"line":409,"column":60,"length":1,"message":"unexpected character: ->\"<- at offset: 9985, skipped 1 characters."}]}
Config file "/Users/candiedcode/Code/api/pyproject.toml" could not be parsed. Verify that format is correct.
0 errors, 0 warnings, 0 informations 

It's failing due to our commit_message.

[tool.semantic_release]
build_command = "python -m pip install build && python -m build --wheel"
commit_message = "chore(release): 🔖 {version}\n\n[skip ci]"
major_on_zero = false
version_variables = [
    "llm_api/__init__.py:__version__",
]
@CandiedCode CandiedCode added the bug Something isn't working label Nov 7, 2024
@LeeeeT
Copy link

LeeeeT commented Nov 7, 2024

This is due to the recent switch to a different TOML parsing library (which presumably has a bug). Here's the upstream issue: sunnyadn/js-toml#2.

@erictraut erictraut added the blocked Waiting on external fix label Nov 7, 2024
erictraut added a commit that referenced this issue Nov 10, 2024
…y switching to a different toml parser. This addresses #9412.
@erictraut erictraut added addressed in next version Issue is fixed and will appear in next published version and removed blocked Waiting on external fix labels Nov 10, 2024
@erictraut
Copy link
Collaborator

This is addressed in pyright 1.1.389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants