Giter Site home page Giter Site logo

Comments (6)

jakebailey avatar jakebailey commented on May 19, 2024 1

I can reproduce this. Minimal example:

import sys

sys version

Type a . after sys. CompletionAnalysis.Node isn't sys like it should be, but is instead version. This makes span.End > trigger, and then it tries to make the result have a span of new SourceSpan(span.Start, trigger), except that the trigger character is before the node that the completion analysis thinks it needs to process.

from python-language-server.

qubitron avatar qubitron commented on May 19, 2024

I get this issue in django app from here: https://github.com/Microsoft/python-sample-vs-learning-django

It's intermittent though, here's DjangoPolls/app/models.py:
completions

from python-language-server.

MikhailArkhipov avatar MikhailArkhipov commented on May 19, 2024

Can't repro :-(

from python-language-server.

MikhailArkhipov avatar MikhailArkhipov commented on May 19, 2024

Will reactivate if it happens again

from python-language-server.

qubitron avatar qubitron commented on May 19, 2024

I am seeing this with latest version

[Error - 9:28:39 AM] Request textDocument/completion failed.
  Message: Start and End must be well ordered
  Code: -32000 
[object Object]

When typing models. on line 5 of:
https://github.com/Microsoft/python-sample-vscode-django-tutorial/blob/master/hello/models.py

from python-language-server.

qubitron avatar qubitron commented on May 19, 2024

Call stack:

[Error - 12:02:22 PM] System.ArgumentException: Start and End must be well ordered
   at Microsoft.PythonTools.SourceSpan.ValidateLocations(SourceLocation start, SourceLocation end) in C:\Users\jabaile\python-language-server\src\Analysis\Engine\Impl\Infrastructure\SourceSpan.cs:line 51
   at Microsoft.PythonTools.SourceSpan..ctor(SourceLocation start, SourceLocation end) in C:\Users\jabaile\python-language-server\src\Analysis\Engine\Impl\Infrastructure\SourceSpan.cs:line 36
   at Microsoft.Python.LanguageServer.Implementation.Server.Completion(CompletionParams params, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\Implementation\Server.Completion.cs:line 80
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.<>c__DisplayClass39_0.<<Completion>b__0>d.MoveNext() in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\LanguageServer.cs:line 289
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.LogOnException[TResult](Func`1 func) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\LanguageServer.cs:line 476
[Error - 12:02:22 PM] Request textDocument/completion failed.
  Message: Start and End must be well ordered
  Code: -32000 

from python-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.