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

Running pyproject-fmt crashed #36

Open
vivodi opened this issue Feb 28, 2025 · 0 comments
Open

Running pyproject-fmt crashed #36

vivodi opened this issue Feb 28, 2025 · 0 comments

Comments

@vivodi
Copy link

vivodi commented Feb 28, 2025

Running pyproject-fmt pyproject.toml with the following file crashed:

[project]
description = """\
    FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from \
    different sources like RSS-feeds, html-pages, various sites and more.\
"""

However, it's totally valid syntax: https://github.com/toml-lang/toml/blob/dc5af251cd348ee053d9355359743767e3d0b123/toml.md?plain=1#L342-L347

Log:

thread '<unnamed>' panicked at common\src\create.rs:22:5:
Could not create string element for "\\ FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from \\ different sources like RSS-feeds, html-pages, various sites and more.\\"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\liuch\AppData\Roaming\uv\tools\pyproject-fmt\Scripts\pyproject-fmt.exe\__main__.py", line 10, in <module>
    sys.exit(runner())
             ~~~~~~^^
  File "C:\Users\liuch\AppData\Roaming\uv\tools\pyproject-fmt\Lib\site-packages\pyproject_fmt\__main__.py", line 98, in runner                                                   
    return run(PyProjectFormatter(), args)
  File "C:\Users\liuch\AppData\Roaming\uv\tools\pyproject-fmt\Lib\site-packages\toml_fmt_common\__init__.py", line 113, in run                                                   
    results = [_handle_one(info, config) for config in configs]
               ~~~~~~~~~~~^^^^^^^^^^^^^^
  File "C:\Users\liuch\AppData\Roaming\uv\tools\pyproject-fmt\Lib\site-packages\toml_fmt_common\__init__.py", line 255, in _handle_one                                           
    formatted = info.format(config.toml, config.opt)
  File "C:\Users\liuch\AppData\Roaming\uv\tools\pyproject-fmt\Lib\site-packages\pyproject_fmt\__main__.py", line 88, in format                                                   
    return format_toml(text, settings)
pyo3_runtime.PanicException: Could not create string element for "\\ FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from \\ different sources like RSS-feeds, html-pages, various sites and more.\\"
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

No branches or pull requests

1 participant