婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > VSCode中autopep8無法運行問題解決方案(提示Error: Command failed,usage)

VSCode中autopep8無法運行問題解決方案(提示Error: Command failed,usage)

熱門標簽:qt百度地圖標注 阿里電話機器人對話 地圖地圖標注有嘆號 電銷機器人系統廠家鄭州 遼寧智能外呼系統需要多少錢 400電話申請資格 正安縣地圖標注app 舉辦過冬奧會的城市地圖標注 螳螂科技外呼系統怎么用

錯誤現象:autopep8無法運行,運行后vscode右下角提示

Error: 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目錄,即擴展安裝目錄。

打開extension.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無法運行內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持腳本之家!

您可能感興趣的文章:
  • Autopep8的使用(python自動編排工具)
  • Pycharm配置autopep8實現流程解析

標簽:合肥 隨州 濟源 昭通 阜新 淘寶好評回訪 興安盟 信陽

巨人網絡通訊聲明:本文標題《VSCode中autopep8無法運行問題解決方案(提示Error: Command failed,usage)》,本文關鍵詞  VSCode,中,autopep8,無法,運行,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《VSCode中autopep8無法運行問題解決方案(提示Error: Command failed,usage)》相關的同類信息!
  • 本頁收集關于VSCode中autopep8無法運行問題解決方案(提示Error: Command failed,usage)的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 吴桥县| 台山市| 宿迁市| 大关县| 石棉县| 泸水县| 临清市| 南木林县| 棋牌| 靖边县| 民勤县| 朝阳区| 石家庄市| 桃园市| 文水县| 都昌县| 长丰县| 会东县| 黎川县| 彭泽县| 大邑县| 汨罗市| 木兰县| 永兴县| 凌海市| 英山县| 娄底市| 历史| 南阳市| 宜川县| 邵阳市| 东安县| 习水县| 山阳县| 正镶白旗| 长治市| 江城| 宝山区| 彩票| 晋州市| 江阴市|