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

pyright loads forever and ends in non-zero exit status 1 #296

Closed
codeofandrin opened this issue Sep 20, 2024 · 1 comment
Closed

pyright loads forever and ends in non-zero exit status 1 #296

codeofandrin opened this issue Sep 20, 2024 · 1 comment

Comments

@codeofandrin
Copy link

codeofandrin commented Sep 20, 2024

When I use pyright it immediately gets stuck and doesn't output anything except of the loading spinner. After a few minutes I get a non-zero exit status 1:

npm error code ETARGET
npm error notarget No matching version found for [email protected].
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: C:\Users\SchalleA\AppData\Local\npm-cache\_logs\2024-09-20T12_21_14_120Z-debug-0.log
Traceback (most recent call last):
  File "C:\Users\SchalleA\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\SchalleA\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\DEV\Scripts\Python\iBox Param Setter\venv\Scripts\pyright.exe\__main__.py", line 7, in <module>
  File "C:\DEV\Scripts\Python\iBox Param Setter\venv\lib\site-packages\pyright\cli.py", line 34, in entrypoint
    sys.exit(main(sys.argv[1:]))
  File "C:\DEV\Scripts\Python\iBox Param Setter\venv\lib\site-packages\pyright\cli.py", line 19, in main
    return run(*args, **kwargs).returncode
  File "C:\DEV\Scripts\Python\iBox Param Setter\venv\lib\site-packages\pyright\cli.py", line 25, in run
    pkg_dir = install_pyright(args, quiet=None)
  File "C:\DEV\Scripts\Python\iBox Param Setter\venv\lib\site-packages\pyright\_utils.py", line 64, in install_pyright
    node.run(
  File "C:\DEV\Scripts\Python\iBox Param Setter\venv\lib\site-packages\pyright\node.py", line 124, in run
    subprocess.run(node_args, env=env, **kwargs),
  File "C:\Users\SchalleA\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Program Files\\nodejs\\npm.cmd', 'install', '[email protected]']' returned non-zero exit status 1.

Since a lot of problems are caused by being behind a proxy, most of them can be fixed by setting the proxy somewhere, but I don't know where that is for pyright.

My pyproject.toml config looks like this (if that somehow helps for reproduction):

[tool.pyright]
include = [
    ".",
]
exclude = [
    "**/__pycache__",
    "build",
    "dist",
    "venv",
]
reportUnnecessaryTypeIgnoreComment = "warning"
reportUnusedImport = "error"
pythonVersion = "3.8"
typeCheckingMode = "basic"

Version info

  • pyright: 1.1.381
  • Python: 3.8.10

Edit

Using pyright 1.1.380 works

@RobertCraigie
Copy link
Owner

Thanks for the report, I'm going to close this in favour of #231 as that will avoid any network issues relating to npm.

@RobertCraigie RobertCraigie closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants