VSCode에서 autopep8에서 문제 해결 방안을 실행할 수 없음(Error: Command failed, usage 알림)
오류: Command failed: autopep8 c:\Users\Administrator\Desktop\Python\제1장 개요\1-10.py usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config filename] [--ignore-local-config] [-r] [-j n] [-p n] [-a] [--experimental] [--exclude globs] [--list-fixes] [--ignore errors] [--select errors] [--max-line-length n] [--line-range line line] [--hang-closing] [--exit-code] [files [files ...]] autopep8: error: autopep8 only takes one filename as argument unless the "--in-place"or "--diff"args are used
usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config filename] [--ignore-local-config] [-r] [-j n] [-p n] [-a] [--experimental] [--exclude globs] [--list-fixes] [--ignore errors] [--select errors] [--max-line-length n] [--line-range line line] [--hang-closing] [--exit-code] [files [files ...]] autopep8: error: autopep8 only takes one filename as argument unless the "--in-place"or "--diff"args are used
오류 원인:
파일 경로에 공백이 포함되어 있습니다!
VSCode에서 autopep8 플러그인 실행 오류 문제 해결 (플러그인 실행, 코드 포맷 없음)
문제현상: autopep8을 실행한 후 플러그인이 정상적으로 실행되고 있음을 알렸지만 코드는 아무런 변화가 없습니다.
문제 해결 프로세스:
1. 우선 명령줄에서 autopep8 파일 경로를 사용합니다.py가 테스트를 진행합니다. 실행 후 명령줄에 모든 코드가 표시되지만 문서를 포맷하지 않았습니다.
2. autopep8을 실행하는 명령 도움말과 네트워크 조회에 따라 알 수 있듯이 autopep8을 실행할 때 --in-place--aggressive 파라미터를 추가해야 한다
명령 형식은 autopep8 --in-place --aggressive 파일 경로 이름입니다.py
명령줄에서 autopep8 문제 해결을 실행합니다!
3. 어떻게 VSCode에서 autopep8에 파라미터를 추가합니까?
preference>setting에서 autopep8Args를 설정하려고 했지만 무효입니다!
파일을 검색하여 C:\Users\Administrator\.vscode\extensions\himanoa.python-autopep8-1.0.2 디렉터리, 즉 확장 설치 디렉터리입니다.
확장을 엽니다.js 파일.
찾다
exec('autopep8 ' + filename, function(error, stdout, stderr){
로 수정
exec('autopep8 --in-place --aggressive ' + filename, function(error, stdout, stderr){
VSCode 재부팅, 문제 해결!VSCode에서 autopep8이 실행되지 않는 문제 해결 방안 (알림 Error: Command failed, usage) 에 대한 이 글은 여기에 소개되었습니다. 더 많은 관련 VSCode autopep8이 실행되지 않는 내용은 이전의 글을 검색하거나 아래의 관련 글을 계속 훑어보십시오. 앞으로 많은 응원 부탁드립니다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Visual Studio Code(VSCode)로 키보드로 선택을 할 수 있도록 한다Atom이나 Goland 등의 많은 에디터에서는 Ctrl + Shift + F 등으로 문자를 선택 상태로 할 수 있습니다. 이런 녀석입니다. 보통이라면 아래와 같은 키 바인딩이 자주 사용되는군요. Ctrl + Shi...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.