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

ERROR: Pylance failed to parse docstring at index 1 #6952

Closed
PythonCoderAS opened this issue Feb 17, 2025 · 2 comments
Closed

ERROR: Pylance failed to parse docstring at index 1 #6952

PythonCoderAS opened this issue Feb 17, 2025 · 2 comments
Assignees
Labels
docstrings fixed in next version (release) A fix has been implemented and will appear in an upcoming version needs repro Issue has not been reproduced yet

Comments

@PythonCoderAS
Copy link

Type: Bug

I have this attribute inside of a Django model:

    queries: str = models.TextField(default="[]")  # report json array
    """
    [
            {
                    "title": "",
                    "query": {

                    }
            }
    ]
    """

Hovering over any piece of code that references this variable gives me:

(variable) queries: str
----
ERROR: Pylance failed to parse docstring at index 1

[ { "title": "", "query": {

            }
    }
]

I would expect it to show me the docstring in full, formatted the same way (not missing any spaces after the initial dedent), but I would accept if it did some weird spacing. However, I do not think it should show that error message.

Extension version: 2025.2.1
VS Code version: Code 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z)
OS version: Darwin arm64 24.2.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 4, 5, 4
Memory (System) 8.00GB (0.10GB free)
Process Argv --crash-reporter-id 2b0708f4-d206-4f56-bb5c-21ca647cc418
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputscf:31238124
hdaa2157:31222309
copilot_t_ci:31222730
jda6j935:31233686

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Feb 17, 2025
@rchiodo
Copy link
Contributor

rchiodo commented Feb 18, 2025

Thanks for the issue. This is a crash in our restructured text parser.

You can disable our restructured text parser with this setting:

Image

@bschnurr bschnurr added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Feb 18, 2025
@bschnurr bschnurr added fixed in next version (release) A fix has been implemented and will appear in an upcoming version and removed fixed in next version (main) A fix has been implemented and will appear in an upcoming version labels Feb 25, 2025
@debonte
Copy link
Contributor

debonte commented Feb 26, 2025

This issue has been fixed in prerelease version 2025.2.101, which was recently released. You can find the changelog here: CHANGELOG.md

@debonte debonte closed this as completed Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docstrings fixed in next version (release) A fix has been implemented and will appear in an upcoming version needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

5 participants