neovim / pynvim

Python client and plugin host for Nvim
http://pynvim.readthedocs.io/en/latest/
Apache License 2.0
1.47k stars 118 forks source link

checkhealth WARNING: Could not contact PyPI to get latest version #557

Closed sudheer82 closed 6 months ago

sudheer82 commented 6 months ago

Curl is installed in my windows system. I could individually run curl https://pypi.python.org/pypi/pynvim/json and no error. However, when i run neovim :checkhealth, facing this error in the report.

: checkhealth output:

Python 3 provider (optional) ~
- pyenv: Path: C:\Users\<username>\.pyenv\pyenv-win\bin\pyenv.BAT
- pyenv: Root: C:\Users\<username>\.pyenv\pyenv-win\
- Using: g:python3_host_prog = "C:/Python312/python.exe"
- Executable: C:\Python312\python.exe
- Python version: 3.12.0
- pynvim version: 0.5.0
- WARNING Could not contact PyPI to get latest version.
- ERROR HTTP request failed: error: curl error with https://pypi.python.org/pypi/pynvim/json: 35
wookayin commented 6 months ago
sudheer82 commented 6 months ago
  1. Yes, the error occurs always
  2. NVIM v0.9.4
  3. Output of :!curl =sL https://pypi.python.org/pypi/pynvim/json
    
    curl: (3) URL rejected: Bad hostname
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revoc
    ation function was unable to check revocation for the certificate.

shell returned 35

wookayin commented 6 months ago

-sL, not =sL. Try :!curl --verbose -fL https://pypi.python.org/pypi/pynvim/json for debugging.

From the output, there was an issue while validating the certificate. What's the output of curl --version?

Anyway this does not seem relevant to pynvim.

wookayin commented 6 months ago

Closing as no response was received and this doesn't seem to be a problem of neovim/pynvim. Try to fix curl (certificate issues) in the command line (or run them within the neovim).

sudheer82 commented 6 months ago

I have used -sL only. it was a typo in the comment

wookayin commented 6 months ago

Yes, let me know if the problem still persists.

ILOT-code commented 5 months ago

I also encountered the same problem. I feel this may be a network configuration issue. I am using wsl, so in windows, I executed: netsh winsock reset, and the problem was solved after restarting my PC.

wookayin commented 5 months ago

Sorry to hear that, but if you don't provide what exactly happened in curl's output there's nothing much to be helped with or improved. Not sure whether the network was really unavailable, or network/internet was fine but only the curl on WSL was buggy and stopped working.