neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
575 stars 51 forks source link

Out of the range or missing libcuda.so.1 #11

Open theFool32 opened 5 years ago

theFool32 commented 5 years ago

It broken when open file.

## versions

vim version: NVIM v0.4.0-420-g29d6993cc
node version: v11.12.0
coc.nvim version: 0.0.62
term: screen-256color
platform: linux

## Error messages
UnhandledRejection: Specified argument was out of the range of valid values.
Error: Specified argument was out of the range of valid values.
    at handleResponse (/home/lijie/.vim/plugged/coc.nvim/node_modules/vscode-jsonrpc/lib/main.js:436:48)
    at processMessageQueue (/home/lijie/.vim/plugged/coc.nvim/node_modules/vscode-jsonrpc/lib/main.js:263:17)
    at Immediate.setImmediate (/home/lijie/.vim/plugged/coc.nvim/node_modules/vscode-jsonrpc/lib/main.js:247:13)
    at processImmediate (timers.js:638:19)
## Output channel: snippets

## Output channel: Python
Starting Microsoft Python language server.
[Info  - 11:04:00 PM] GetCurrentSearchPaths /home/lijie/.pyenv/shims/python 
[Info  - 11:04:00 PM] Python search paths:
[Info  - 11:04:00 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7
[Info  - 11:04:00 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/lib-dynload
[Info  - 11:04:00 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/site-packages
[Info  - 11:04:00 PM] Configuration search paths:
[Error  - 11:04:00 PM] Server initialization failed.
  Message: Specified argument was out of the range of valid values.
  Code: -32000 
   at System.ReadOnlySpan`1..ctor(Void* pointer, Int32 length)
   at Interop.Sys.DirectoryEntry.GetName(Span`1 buffer)
   at System.IO.Enumeration.FileSystemEntry.get_FileName()
   at System.IO.Enumeration.FileSystemEnumerableFactory.<>c__DisplayClass3_0.<UserFiles>b__1(FileSystemEntry& entry)
   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator.ShouldIncludeEntry(FileSystemEntry& entry)
   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Python.Core.IO.PathUtils.EnumerateFiles(String root, String pattern, Boolean recurse, Boolean fullPaths)+MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Microsoft.Python.Analysis.Modules.Resolution.ModuleResolutionBase.ReloadModulePaths(IEnumerable`1& rootPaths)
   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.ReloadAsync(CancellationToken cancellationToken)
   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.InitializeAsync(CancellationToken cancellationToken)
   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.LoadBuiltinTypesAsync(String root, IServiceManager sm, CancellationToken cancellationToken)
   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.CreateAsync(InterpreterConfiguration configuration, String root, IServiceManager sm, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.Server.InitializeAsync(InitializeParams params, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Initialize(JToken token, CancellationToken cancellationToken)

I try another project, the error differs. I install pytorch along with tensorflow-cpu, and no nvidia card is on my PC.

## versions

vim version: NVIM v0.4.0-420-g29d6993cc
node version: v11.12.0
coc.nvim version: 0.0.62
term: screen-256color
platform: linux

## Error messages

## Output channel: snippets

## Output channel: Python
Starting Microsoft Python language server.
[Info  - 11:02:27 PM] GetCurrentSearchPaths /home/lijie/.pyenv/versions/3.7.1/bin/python 
[Info  - 11:02:27 PM] Python search paths:
[Info  - 11:02:27 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7
[Info  - 11:02:27 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/lib-dynload
[Info  - 11:02:27 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/site-packages
[Info  - 11:02:27 PM] Configuration search paths:
[Info  - 11:02:27 PM] Microsoft Python Language Server version 0.2.31.0
[Info  - 11:02:27 PM] Initializing for /home/lijie/.pyenv/versions/3.7.1/bin/python
Traceback (most recent call last):
  File "/home/lijie/.config/coc/extensions/coc-python-data/languageServer.0.2.31/scrape_module.py", line 1489, in <module>
    state.initial_import(sys.argv[2])
  File "/home/lijie/.config/coc/extensions/coc-python-data/languageServer.0.2.31/scrape_module.py", line 872, in initial_import
    mod = __import__(self.module_name)
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
[Info  - 11:03:17 PM] GetCurrentSearchPaths /home/lijie/.pyenv/shims/python 
[Info  - 11:03:17 PM] Python search paths:
[Info  - 11:03:17 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7
[Info  - 11:03:17 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/lib-dynload
[Info  - 11:03:17 PM]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/site-packages
[Info  - 11:03:17 PM] Configuration search paths:
[Info  - 11:03:18 PM] Microsoft Python Language Server version 0.2.31.0
[Info  - 11:03:18 PM] Initializing for /home/lijie/.pyenv/shims/python
Traceback (most recent call last):
  File "/home/lijie/.config/coc/extensions/coc-python-data/languageServer.0.2.31/scrape_module.py", line 1489, in <module>
    state.initial_import(sys.argv[2])
  File "/home/lijie/.config/coc/extensions/coc-python-data/languageServer.0.2.31/scrape_module.py", line 872, in initial_import
    mod = __import__(self.module_name)
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

Thx

theFool32 commented 5 years ago

VS code works well on both projects.

chemzqm commented 5 years ago

Need verbose output from python language server https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

chemzqm commented 5 years ago

@theFool32 Are you using jedi with VSCode?

Screen Shot 2019-03-28 at 12 21 59 AM
theFool32 commented 5 years ago

Using jedi with VSCode indeed. Turning off it makes VSCode unusable as well. coc-python with jedi works.

log from language server for Out of the range:

## versions

vim version: NVIM v0.4.0-420-g29d6993cc
node version: v8.9.0
coc.nvim version: 0.0.63
term: screen-256color
platform: linux

## Error messages
(node:16747) [DEP0010] DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:16747) [DEP0011] DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.
UnhandledRejection: Specified argument was out of the range of valid values.
Error: Specified argument was out of the range of valid values.
    at handleResponse (/snapshot/coc.nvim/node_modules/vscode-jsonrpc/lib/main.js:436:48)
    at processMessageQueue (/snapshot/coc.nvim/node_modules/vscode-jsonrpc/lib/main.js:263:17)
    at Immediate.setImmediate [as _onImmediate] (/snapshot/coc.nvim/node_modules/vscode-jsonrpc/lib/main.js:247:13)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
## Output channel: snippets
[Error 09:50:35] Convert regex error for: (^|(?<=\W))\.$
[Error 09:50:35] Convert regex error for: li(st)? (?<num>\d+)$
[Error 09:50:35] Convert regex error for: ol(st)? (?<num>\d+)$

## Output channel: Python
Starting Microsoft Python language server.
[Trace - 09:50:37] Sending request 'initialize - (0)'.
Params: {
    "processId": 16747,
    "rootPath": "/home/lijie/old/proj/test",
    "rootUri": "file:///home/lijie/old/proj/test",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional"
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                }
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true
                },
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    }
                }
            },
            "definition": {
                "dynamicRegistration": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                }
            },
            "codeAction": {
                "dynamicRegistration": true,
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                }
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true
            },
            "documentLink": {
                "dynamicRegistration": true
            },
            "typeDefinition": {
                "dynamicRegistration": true
            },
            "implementation": {
                "dynamicRegistration": true
            },
            "declaration": {
                "dynamicRegistration": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            }
        }
    },
    "initializationOptions": {
        "interpreter": {
            "properties": {
                "InterpreterPath": "/home/lijie/.pyenv/shims/python",
                "Version": "3.7.1",
                "DatabasePath": "/home/lijie/.config/coc/extensions/coc-python-data/languageServer.0.2.31"
            }
        },
        "displayOptions": {
            "preferredFormat": "markdown",
            "trimDocumentationLines": false,
            "maxDocumentationLineLength": 0,
            "trimDocumentationText": false,
            "maxDocumentationTextLength": 0
        },
        "searchPaths": [],
        "typeStubSearchPaths": [
            "/home/lijie/.config/coc/extensions/node_modules/coc-python/languageServer.0.2.31/Typeshed"
        ],
        "excludeFiles": [
            "**/Lib/**",
            "**/site-packages/**",
            ".vscode/*.py",
            "**/site-packages/**/*.py"
        ],
        "testEnvironment": false,
        "analysisUpdates": true,
        "traceLogging": true,
        "asyncStartup": true
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///home/lijie/old/proj/test",
            "name": "test"
        }
    ]
}

[Trace - 09:50:38] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "GetCurrentSearchPaths /home/lijie/.pyenv/shims/python "
}

[Info  - 09:50:38] GetCurrentSearchPaths /home/lijie/.pyenv/shims/python 
[Trace - 09:50:38] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "Python search paths:"
}

[Info  - 09:50:38] Python search paths:
[Trace - 09:50:38] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "    /home/lijie/.pyenv/versions/3.7.1/lib/python3.7"
}

[Info  - 09:50:38]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7
[Trace - 09:50:38] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "    /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/lib-dynload"
}

[Info  - 09:50:38]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/lib-dynload
[Trace - 09:50:38] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "    /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/site-packages"
}

[Info  - 09:50:38]     /home/lijie/.pyenv/versions/3.7.1/lib/python3.7/site-packages
[Trace - 09:50:38] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "Configuration search paths:"
}

[Info  - 09:50:38] Configuration search paths:
[Trace - 09:50:38] Received notification 'telemetry/event'.
Params: {
    "EventName": "python_language_server/rpc.exception",
    "Properties": {
        "name": "ArgumentOutOfRangeException",
        "stackTrace": "   at System.ReadOnlySpan`1..ctor(Void* pointer, Int32 length)\n   at Interop.Sys.DirectoryEntry.GetName(Span`1 buffer)\n   at System.IO.Enumeration.FileSystemEntry.get_FileName()\n   at System.IO.Enumeration.FileSystemEnumerableFactory.<>c__DisplayClass3_0.<UserFiles>b__1(FileSystemEntry& entry)\n   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator.ShouldIncludeEntry(FileSystemEntry& entry)\n   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()\n   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)\n   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\n   at Microsoft.Python.Core.IO.PathUtils.EnumerateFiles(String root, String pattern, Boolean recurse, Boolean fullPaths)+MoveNext()\n   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()\n   at Microsoft.Python.Analysis.Modules.Resolution.ModuleResolutionBase.ReloadModulePaths(IEnumerable`1& rootPaths)\n   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.ReloadAsync(CancellationToken cancellationToken)\n   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.InitializeAsync(CancellationToken cancellationToken)\n   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.LoadBuiltinTypesAsync(String root, IServiceManager sm, CancellationToken cancellationToken)\n   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.CreateAsync(InterpreterConfiguration configuration, String root, IServiceManager sm, CancellationToken cancellationToken)\n   at Microsoft.Python.LanguageServer.Implementation.Server.InitializeAsync(InitializeParams params, CancellationToken cancellationToken)\n   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Initialize(JToken token, CancellationToken cancellationToken)",
        "method": "initialize",
        "plsVersion": "0.2.31.0"
    },
    "Measurements": {}
}

[Trace - 09:50:38] Received response 'initialize - (0)' in 1169ms. Request failed: Specified argument was out of the range of valid values. (-32000).
Error data: "   at System.ReadOnlySpan`1..ctor(Void* pointer, Int32 length)\n   at Interop.Sys.DirectoryEntry.GetName(Span`1 buffer)\n   at System.IO.Enumeration.FileSystemEntry.get_FileName()\n   at System.IO.Enumeration.FileSystemEnumerableFactory.<>c__DisplayClass3_0.<UserFiles>b__1(FileSystemEntry& entry)\n   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator.ShouldIncludeEntry(FileSystemEntry& entry)\n   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()\n   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)\n   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\n   at Microsoft.Python.Core.IO.PathUtils.EnumerateFiles(String root, String pattern, Boolean recurse, Boolean fullPaths)+MoveNext()\n   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()\n   at Microsoft.Python.Analysis.Modules.Resolution.ModuleResolutionBase.ReloadModulePaths(IEnumerable`1& rootPaths)\n   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.ReloadAsync(CancellationToken cancellationToken)\n   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.InitializeAsync(CancellationToken cancellationToken)\n   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.LoadBuiltinTypesAsync(String root, IServiceManager sm, CancellationToken cancellationToken)\n   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.CreateAsync(InterpreterConfiguration configuration, String root, IServiceManager sm, CancellationToken cancellationToken)\n   at Microsoft.Python.LanguageServer.Implementation.Server.InitializeAsync(InitializeParams params, CancellationToken cancellationToken)\n   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Initialize(JToken token, CancellationToken cancellationToken)"

[Error  - 09:50:38] Server initialization failed.
  Message: Specified argument was out of the range of valid values.
  Code: -32000 
   at System.ReadOnlySpan`1..ctor(Void* pointer, Int32 length)
   at Interop.Sys.DirectoryEntry.GetName(Span`1 buffer)
   at System.IO.Enumeration.FileSystemEntry.get_FileName()
   at System.IO.Enumeration.FileSystemEnumerableFactory.<>c__DisplayClass3_0.<UserFiles>b__1(FileSystemEntry& entry)
   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator.ShouldIncludeEntry(FileSystemEntry& entry)
   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Python.Core.IO.PathUtils.EnumerateFiles(String root, String pattern, Boolean recurse, Boolean fullPaths)+MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Microsoft.Python.Analysis.Modules.Resolution.ModuleResolutionBase.ReloadModulePaths(IEnumerable`1& rootPaths)
   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.ReloadAsync(CancellationToken cancellationToken)
   at Microsoft.Python.Analysis.Modules.Resolution.MainModuleResolution.InitializeAsync(CancellationToken cancellationToken)
   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.LoadBuiltinTypesAsync(String root, IServiceManager sm, CancellationToken cancellationToken)
   at Microsoft.Python.Analysis.Analyzer.PythonInterpreter.CreateAsync(InterpreterConfiguration configuration, String root, IServiceManager sm, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.Server.InitializeAsync(InitializeParams params, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Initialize(JToken token, CancellationToken cancellationToken)
[Trace - 09:50:38] Sending request 'shutdown - (1)'.
[Trace - 09:50:38] Received response 'shutdown - (1)' in 13ms.
Result: {}

[Trace - 09:50:38] Sending notification 'exit'.
No parameters provided.

libcuda.so.1 seems working.

Thx.