ConnectionRefusedError: [WinError 10061] 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다

이런 에러가 여러 상황에서 발생할 수 있지만.. 특별히 vsc (visual studio code)에서 실행중 발생했다면

실행창에서 에러 내용을 검색해본다.

 

PS D:\project\python\webscrapping>  & 'C:\Program Files\Python310\python.exe' 'c:\Users\android\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher' '50475' '--' 'd:\project\python\webscrapping\youtubedown.py'
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\Users\android\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher\__main__.py", line 97, in <module>
    main()
  File "c:\Users\android\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher\__main__.py", line 53, in main
  File "c:\Users\android\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher/../..\debugpy\launcher\__init__.py", line 34,ConnectionRefusedError: [WinError 10061] 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다
PS D:\project\python\webscrapping>  d:; cd 'd:\project\python\webscrapping'; & 'C:\Program Files\Python310\python.exe' 'c:\Users\android\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher' '61421' '--' 'd:\project\python\webscrapping\.vscode\launch.json'                                                                                            ndroid\.vscode\extensions\ms-python
  File "d:\project\python\webscrapping\.vscode\launch.json", line 1                                                               on' 
    {
    ^
SyntaxError: '{' was never closed

 

여기서 launch.jscon 파일에 오류가 확인되었고 이경우에는

 

해당경로의 json 파일을 제거함으로써 잘 해결되었다.

+ Recent posts