Skip to content

Server panic on a src/package/__init__.py file containing just fr #1277

@AlexWaygood

Description

@AlexWaygood

Summary

I just hit this panic in the playground, which appears to be server-specific (and also specific to it being an __init__.py file):

Screen.Recording.2025-09-29.at.14.28.04.mov

Right-clicking on the webpage and selecting "Inspect", I see two stacktraces: initially this one:

panicked at crates/ty_python_semantic/src/module_resolver/list.rs:78:18:
System search path should have a registered root

Stack:

Bp/l.wbg.__wbg_new_8a6f238a6ece86ea@https://play.ty.dev/assets/index-IVeoMaQp.js:64:25613
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[10069]:0x7b45f6
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[3133]:0x61aca6
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[5324]:0x70d654
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[8097]:0x796599
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[6798]:0x74e0a2
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[921]:0x3ada21
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[524]:0x2ccb9a
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[512]:0x2c3f37
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[521]:0x2caf9f
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[2274]:0x584e67
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[8024]:0x77f66b
completions@https://play.ty.dev/assets/index-IVeoMaQp.js:64:21219
provideCompletionItems@https://play.ty.dev/assets/Editor-DvbeuRwl.js:1:3621
h/<@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:660:28999
h@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:660:28760
trigger@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:726:8465
_doTriggerQuickSuggest/<@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:726:7331
cancelAndSet/this._token<@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:122:15238


[index-IVeoMaQp.js:64:24316](https://play.ty.dev/assets/index-IVeoMaQp.js)
    __wbg_error_7534b8e9a36f1ab4 index-IVeoMaQp.js:64
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:8079041
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:6401190
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:7394900
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:7955865
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:7659682
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:3856929
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:2935706
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:2899767
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:2928543
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:5787239
    <anonymous> ty_wasm_bg-CmMjrFpL.wasm:7861867
    completions index-IVeoMaQp.js:64
    provideCompletionItems Editor-DvbeuRwl.js:1
    h suggest.ts:302
    h suggest.ts:288
    trigger suggestModel.ts:495
    _doTriggerQuickSuggest suggestModel.ts:432
    _token async.ts:443

and then this one (repeated several times):

panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/fetch.rs:275:21:
dependency graph cycle when querying list_modules(Id(c400)), set cycle_fn/cycle_initial to fixpoint iterate.
Query stack:
[
    list_modules(Id(c400)),
    list_modules_in(Id(c801)),
    check_file_impl(Id(2801)),
    infer_scope_types(Id(1002g1)),
    suppressions(Id(2801)),
    ClassLiteral < 'db >::try_mro_(Id(8c4f)),
    infer_definition_types(Id(65b3)),
    infer_expression_types_impl(Id(2c68)),
    infer_expression_types_impl(Id(2c38)),
    Type < 'db >::member_lookup_with_policy_(Id(30a8)),
    infer_expression_types_impl(Id(2c37)),
    infer_definition_types(Id(1488)),
    infer_definition_types(Id(150b)),
    infer_expression_types_impl(Id(2c30)),
    all_narrowing_constraints_for_expression(Id(2ec2)),
    imported_modules(Id(ca4)),
    infer_definition_types(Id(ac59)),
    file_to_module(Id(c8f)),
    source_text(Id(c8f)),
]

Stack:

Bp/l.wbg.__wbg_new_8a6f238a6ece86ea@https://play.ty.dev/assets/index-IVeoMaQp.js:64:25613
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[10069]:0x7b45f6
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[3133]:0x61aca6
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[5324]:0x70d654
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[8097]:0x796599
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[6160]:0x73a6bc
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[2274]:0x584a3a
@https://play.ty.dev/assets/ty_wasm_bg-CmMjrFpL.wasm:wasm-function[8024]:0x77f66b
completions@https://play.ty.dev/assets/index-IVeoMaQp.js:64:21219
provideCompletionItems@https://play.ty.dev/assets/Editor-DvbeuRwl.js:1:3621
h/<@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:660:28999
h@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:660:28760
trigger@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:726:8465
_doTriggerQuickSuggest/<@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:726:7331
cancelAndSet/this._token<@https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js:122:15238

Version

No response

Metadata

Metadata

Assignees

Labels

completionsBugs or features relating to autocomplete suggestionsfatala fatal error (panic or crash)serverRelated to the LSP server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions