Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.5k stars 454 forks source link

Weird symbols with autopep8 #424

Closed manning23 closed 9 years ago

manning23 commented 9 years ago

Error: 'autopep8' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� at C:\Users\WK.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee:258:27 at tryCatcher (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\util.js:24:31) at Promise._settlePromiseFromHandler (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\promise.js:454:31) at Promise._settlePromiseAt (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\promise.js:530:18) at Promise._settlePromises (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\promise.js:646:14) at Async._drainQueue (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\async.js:182:16) at Async._drainQueues (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\async.js:192:10) at MutationObserver.Async.drainQueues (C:\Users\WK.atom\packages\atom-beautify\node_modules\bluebird\js\main\async.js:15:14) at process._tickCallback (node.js:367:9)

jmenges commented 9 years ago

It would be helpful if you could provide the full debugging output (Right Cick + Debug Atom Beautify).

manning23 commented 9 years ago

Atom Beautify - Debugging information

The following debugging information was generated by Atom Beautify on Sat Jun 27 2015 21:34:59 GMT+0800 (中国标准时间).


Platform: win32

Versions

Atom Version: 1.0.0

Atom Beautify Version: 0.28.7

Original file to be beautified

Original File Path: Z:\home\work\MScanner\scanner\lib\core\schedule.py

Original File Grammar: Python

Original File Language: Python

Original File Contents:

#!/usr/bin/env python
# coding:utf-8
# manning  2015-1-27
import Queue
import time
import gevent

def exit_condition():
    return True

def scheduler_by_gevent_for_scanner(scanner_global_variable):
    while exit_condition():
        print scanner_global_variable.url_queue.qsize()
        gevent.sleep(5)

Beautification options

Editor Options: Options from Atom Editor settings

{
    "_default": {
        "indent_size": 4,
        "indent_char": " ",
        "indent_with_tabs": false
    }
}

Config Options: Options from Atom Beautify package settings

{
    "cs": {
        "configPath": ""
    },
    "c": {
        "configPath": ""
    },
    "cpp": {
        "configPath": ""
    },
    "css": {
        "indent_size": 4,
        "indent_char": " ",
        "selector_separator_newline": false,
        "newline_between_rules": false,
        "preserve_newlines": false,
        "wrap_line_length": 0,
        "indent_comments": true,
        "force_indentation": false,
        "convert_quotes": "none",
        "align_assignments": false
    },
    "d": {
        "configPath": ""
    },
    "fortran": {
        "emacs_path": "",
        "emacs_script_path": ""
    },
    "html": {
        "indent_inner_html": false,
        "indent_size": 4,
        "indent_char": " ",
        "brace_style": "collapse",
        "indent_scripts": "normal",
        "wrap_line_length": 250,
        "wrap_attributes": "auto",
        "wrap_attributes_indent_size": 4,
        "preserve_newlines": true,
        "max_preserve_newlines": 10,
        "unformatted": [
            "a",
            "sub",
            "sup",
            "b",
            "i",
            "u"
        ],
        "end_with_newline": false
    },
    "java": {
        "configPath": ""
    },
    "js": {
        "indent_size": 4,
        "indent_char": " ",
        "indent_level": 0,
        "indent_with_tabs": false,
        "preserve_newlines": true,
        "max_preserve_newlines": 10,
        "space_in_paren": false,
        "jslint_happy": false,
        "space_after_anon_function": false,
        "brace_style": "collapse",
        "break_chained_methods": false,
        "keep_array_indentation": false,
        "keep_function_indentation": false,
        "space_before_conditional": true,
        "eval_code": false,
        "unescape_strings": false,
        "wrap_line_length": 0,
        "end_with_newline": false
    },
    "objectivec": {
        "configPath": ""
    },
    "pawn": {
        "configPath": ""
    },
    "perl": {
        "perltidy_profile": ""
    },
    "php": {
        "cs_fixer_path": "",
        "fixers": "",
        "level": ""
    },
    "python": {
        "max_line_length": 79,
        "indent_size": 4,
        "ignore": [
            "E24"
        ]
    },
    "ruby": {
        "indent_size": 4,
        "indent_char": " "
    },
    "rust": {
        "rustfmt_path": ""
    },
    "sql": {
        "indent_size": 4,
        "keywords": "upper",
        "identifiers": "lower"
    },
    "vala": {
        "configPath": ""
    }
}

Home Options: Options from C:\Users\WK\.jsbeautifyrc

{
    "_default": {}
}

EditorConfig Options: Options from EditorConfig file

{
    "_default": {}
}

Project Options: Options from .jsbeautifyrc files starting from directory Z:\home\work\MScanner\scanner\lib\core and going up to root

[
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    },
    {
        "_default": {}
    }
]

Final Options: Final combined options that are used

{
    "indent_size": 4,
    "indent_char": " ",
    "indent_with_tabs": false,
    "max_line_length": 79,
    "ignore": [
        "E24"
    ]
}

Package Settings: The raw package settings options

{
    "_analyticsUserId": "71bf7ac5-206b-4259-9e5c-109fbce484d1",
    "analytics": true,
    "_loggerLevel": "warn",
    "beautifyEntireFileOnSave": true,
    "muteUnsupportedLanguageErrors": false,
    "muteAllErrors": false,
    "cs_configPath": "",
    "c_configPath": "",
    "cpp_configPath": "",
    "css_indent_size": 4,
    "css_indent_char": " ",
    "css_selector_separator_newline": false,
    "css_newline_between_rules": false,
    "css_preserve_newlines": false,
    "css_wrap_line_length": 0,
    "css_indent_comments": true,
    "css_force_indentation": false,
    "css_convert_quotes": "none",
    "css_align_assignments": false,
    "d_configPath": "",
    "fortran_emacs_path": "",
    "fortran_emacs_script_path": "",
    "html_indent_inner_html": false,
    "html_indent_size": 4,
    "html_indent_char": " ",
    "html_brace_style": "collapse",
    "html_indent_scripts": "normal",
    "html_wrap_line_length": 250,
    "html_wrap_attributes": "auto",
    "html_wrap_attributes_indent_size": 4,
    "html_preserve_newlines": true,
    "html_max_preserve_newlines": 10,
    "html_unformatted": [
        "a",
        "sub",
        "sup",
        "b",
        "i",
        "u"
    ],
    "html_end_with_newline": false,
    "java_configPath": "",
    "js_indent_size": 4,
    "js_indent_char": " ",
    "js_indent_level": 0,
    "js_indent_with_tabs": false,
    "js_preserve_newlines": true,
    "js_max_preserve_newlines": 10,
    "js_space_in_paren": false,
    "js_jslint_happy": false,
    "js_space_after_anon_function": false,
    "js_brace_style": "collapse",
    "js_break_chained_methods": false,
    "js_keep_array_indentation": false,
    "js_keep_function_indentation": false,
    "js_space_before_conditional": true,
    "js_eval_code": false,
    "js_unescape_strings": false,
    "js_wrap_line_length": 0,
    "js_end_with_newline": false,
    "objectivec_configPath": "",
    "pawn_configPath": "",
    "perl_perltidy_profile": "",
    "php_cs_fixer_path": "",
    "php_fixers": "",
    "php_level": "",
    "python_max_line_length": 79,
    "python_indent_size": 4,
    "python_ignore": [
        "E24"
    ],
    "ruby_indent_size": 4,
    "ruby_indent_char": " ",
    "rust_rustfmt_path": "",
    "sql_indent_size": 4,
    "sql_keywords": "upper",
    "sql_identifiers": "lower",
    "vala_configPath": "",
    "language_cs_disabled": false,
    "language_cs_default_beautifier": "Uncrustify",
    "language_cs_beautify_on_save": false,
    "language_c_disabled": false,
    "language_c_default_beautifier": "Uncrustify",
    "language_c_beautify_on_save": false,
    "language_coffeescript_disabled": false,
    "language_coffeescript_default_beautifier": "coffee-fmt",
    "language_coffeescript_beautify_on_save": false,
    "language_cpp_disabled": false,
    "language_cpp_default_beautifier": "Uncrustify",
    "language_cpp_beautify_on_save": false,
    "language_css_disabled": false,
    "language_css_default_beautifier": "JS Beautify",
    "language_css_beautify_on_save": false,
    "language_csv_disabled": false,
    "language_csv_default_beautifier": "Pretty Diff",
    "language_csv_beautify_on_save": false,
    "language_d_disabled": false,
    "language_d_default_beautifier": "Uncrustify",
    "language_d_beautify_on_save": false,
    "language_ejs_disabled": false,
    "language_ejs_default_beautifier": "Pretty Diff",
    "language_ejs_beautify_on_save": false,
    "language_erb_disabled": false,
    "language_erb_default_beautifier": "Pretty Diff",
    "language_erb_beautify_on_save": false,
    "language_go_disabled": false,
    "language_go_default_beautifier": "gofmt",
    "language_go_beautify_on_save": false,
    "language_fortran_disabled": false,
    "language_fortran_default_beautifier": "Fortran Beautifier",
    "language_fortran_beautify_on_save": false,
    "language_handlebars_disabled": false,
    "language_handlebars_default_beautifier": "JS Beautify",
    "language_handlebars_beautify_on_save": false,
    "language_html_disabled": false,
    "language_html_default_beautifier": "JS Beautify",
    "language_html_beautify_on_save": false,
    "language_java_disabled": false,
    "language_java_default_beautifier": "Uncrustify",
    "language_java_beautify_on_save": false,
    "language_js_disabled": false,
    "language_js_default_beautifier": "JS Beautify",
    "language_js_beautify_on_save": false,
    "language_json_disabled": false,
    "language_json_default_beautifier": "JS Beautify",
    "language_json_beautify_on_save": false,
    "language_jsx_disabled": false,
    "language_jsx_default_beautifier": "Pretty Diff",
    "language_jsx_beautify_on_save": false,
    "language_less_disabled": false,
    "language_less_default_beautifier": "Pretty Diff",
    "language_less_beautify_on_save": false,
    "language_markdown_disabled": false,
    "language_markdown_default_beautifier": "Tidy Markdown",
    "language_markdown_beautify_on_save": false,
    "language_marko_disabled": false,
    "language_marko_default_beautifier": "JS Beautify",
    "language_marko_beautify_on_save": false,
    "language_mustache_disabled": false,
    "language_mustache_default_beautifier": "JS Beautify",
    "language_mustache_beautify_on_save": false,
    "language_objectivec_disabled": false,
    "language_objectivec_default_beautifier": "Uncrustify",
    "language_objectivec_beautify_on_save": false,
    "language_pawn_disabled": false,
    "language_pawn_default_beautifier": "Uncrustify",
    "language_pawn_beautify_on_save": false,
    "language_perl_disabled": false,
    "language_perl_default_beautifier": "Perltidy",
    "language_perl_beautify_on_save": false,
    "language_php_disabled": false,
    "language_php_default_beautifier": "PHP-CS-Fixer",
    "language_php_beautify_on_save": false,
    "language_python_disabled": false,
    "language_python_default_beautifier": "autopep8",
    "language_python_beautify_on_save": false,
    "language_ruby_disabled": false,
    "language_ruby_default_beautifier": "Rubocop",
    "language_ruby_beautify_on_save": false,
    "language_rust_disabled": false,
    "language_rust_default_beautifier": "rustfmt",
    "language_rust_beautify_on_save": false,
    "language_sass_disabled": false,
    "language_sass_default_beautifier": "Pretty Diff",
    "language_sass_beautify_on_save": false,
    "language_scss_disabled": false,
    "language_scss_default_beautifier": "Pretty Diff",
    "language_scss_beautify_on_save": false,
    "language_spacebars_disabled": false,
    "language_spacebars_default_beautifier": "Pretty Diff",
    "language_spacebars_beautify_on_save": false,
    "language_sql_disabled": false,
    "language_sql_default_beautifier": "sqlformat",
    "language_sql_beautify_on_save": false,
    "language_swig_disabled": false,
    "language_swig_default_beautifier": "Pretty Diff",
    "language_swig_beautify_on_save": false,
    "language_tss_disabled": false,
    "language_tss_default_beautifier": "Pretty Diff",
    "language_tss_beautify_on_save": false,
    "language_twig_disabled": false,
    "language_twig_default_beautifier": "Pretty Diff",
    "language_twig_beautify_on_save": false,
    "language_typescript_disabled": false,
    "language_typescript_default_beautifier": "TypeScript Formatter",
    "language_typescript_beautify_on_save": false,
    "language_vala_disabled": false,
    "language_vala_default_beautifier": "Uncrustify",
    "language_vala_beautify_on_save": false,
    "language_visualforce_disabled": false,
    "language_visualforce_default_beautifier": "Pretty Diff",
    "language_visualforce_beautify_on_save": false,
    "language_xml_disabled": false,
    "language_xml_default_beautifier": "Pretty Diff",
    "language_xml_beautify_on_save": false
}

Results

Beautified File Contents:

Error: 'autopep8' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

Logs:

2015-06-27T13:34:59.225Z - info: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] beautify #!/usr/bin/env python
# coding:utf-8
# manning  2015-1-27
import Queue
import time
import gevent

def exit_condition():
    return True

def scheduler_by_gevent_for_scanner(scanner_global_variable):
    while exit_condition():
        print scanner_global_variable.url_queue.qsize()
        gevent.sleep(5)
 [ { _default: { indent_size: 4, indent_char: ' ', indent_with_tabs: false } },
  { cs: { configPath: '' },
    c: { configPath: '' },
    cpp: { configPath: '' },
    css: 
     { indent_size: 4,
       indent_char: ' ',
       selector_separator_newline: false,
       newline_between_rules: false,
       preserve_newlines: false,
       wrap_line_length: 0,
       indent_comments: true,
       force_indentation: false,
       convert_quotes: 'none',
       align_assignments: false },
    d: { configPath: '' },
    fortran: { emacs_path: '', emacs_script_path: '' },
    html: 
     { indent_inner_html: false,
       indent_size: 4,
       indent_char: ' ',
       brace_style: 'collapse',
       indent_scripts: 'normal',
       wrap_line_length: 250,
       wrap_attributes: 'auto',
       wrap_attributes_indent_size: 4,
       preserve_newlines: true,
       max_preserve_newlines: 10,
       unformatted: [Object],
       end_with_newline: false },
    java: { configPath: '' },
    js: 
     { indent_size: 4,
       indent_char: ' ',
       indent_level: 0,
       indent_with_tabs: false,
       preserve_newlines: true,
       max_preserve_newlines: 10,
       space_in_paren: false,
       jslint_happy: false,
       space_after_anon_function: false,
       brace_style: 'collapse',
       break_chained_methods: false,
       keep_array_indentation: false,
       keep_function_indentation: false,
       space_before_conditional: true,
       eval_code: false,
       unescape_strings: false,
       wrap_line_length: 0,
       end_with_newline: false },
    objectivec: { configPath: '' },
    pawn: { configPath: '' },
    perl: { perltidy_profile: '' },
    php: { cs_fixer_path: '', fixers: '', level: '' },
    python: { max_line_length: 79, indent_size: 4, ignore: [Object] },
    ruby: { indent_size: 4, indent_char: ' ' },
    rust: { rustfmt_path: '' },
    sql: { indent_size: 4, keywords: 'upper', identifiers: 'lower' },
    vala: { configPath: '' } },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} },
  { _default: {} } ] Python Z:\home\work\MScanner\scanner\lib\core\schedule.py undefined
2015-06-27T13:34:59.225Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee]  indent_size=4, indent_char= , indent_with_tabs=false, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, end_with_newline=false, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , 
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] [ { name: 'Python',
    namespace: 'python',
    grammars: [ 'Python' ],
    extensions: [ 'py' ],
    options: 
     { max_line_length: [Object],
       indent_size: [Object],
       ignore: [Object] },
    beautifiers: [ 'autopep8' ] } ] 'Python' 'py'
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] Language Python supported
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] getOptions selections [ 'python' ] indent_size=4, indent_char= , indent_with_tabs=false, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, end_with_newline=false, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , 
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true indent_size=4, indent_char= , indent_with_tabs=false
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python indent_size=4, indent_char= , indent_with_tabs=false
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, end_with_newline=false, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python max_line_length=79, indent_size=4, ignore=[E24]
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python max_line_length=79, indent_size=4, ignore=[E24]
2015-06-27T13:34:59.226Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] true 
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python undefined
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options python
2015-06-27T13:34:59.227Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] Python name=Python, namespace=python, grammars=[Python], extensions=[py], type=integer, default=79, description=set maximum allowed line length (Supported by autopep8), title=Python - Max line length, beautifiers=[autopep8], type=integer, default=4, minimum=0, description=Indentation size/length (Supported by autopep8), title=Python - Indent size, beautifiers=[autopep8], type=array, default=[E24], type=string, description=do not fix these errors/warnings (Supported by autopep8), title=Python - Ignore, beautifiers=[autopep8], beautifiers=[autopep8]
2015-06-27T13:34:59.228Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] options indent_size=4, indent_char= , indent_with_tabs=false, max_line_length=79, ignore=[E24]
2015-06-27T13:34:59.228Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] beautifiers silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[Python]
2015-06-27T13:34:59.228Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] Python Z:\home\work\MScanner\scanner\lib\core\schedule.py { indent_size: 4,
  indent_char: ' ',
  indent_with_tabs: false,
  max_line_length: 79,
  ignore: [ 'E24' ] } indent_size=4, indent_char= , indent_with_tabs=false, configPath=, configPath=, configPath=, indent_size=4, indent_char= , selector_separator_newline=false, newline_between_rules=false, preserve_newlines=false, wrap_line_length=0, indent_comments=true, force_indentation=false, convert_quotes=none, align_assignments=false, configPath=, emacs_path=, emacs_script_path=, indent_inner_html=false, indent_size=4, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=4, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=4, indent_char= , indent_level=0, indent_with_tabs=false, preserve_newlines=true, max_preserve_newlines=10, space_in_paren=false, jslint_happy=false, space_after_anon_function=false, brace_style=collapse, break_chained_methods=false, keep_array_indentation=false, keep_function_indentation=false, space_before_conditional=true, eval_code=false, unescape_strings=false, wrap_line_length=0, end_with_newline=false, configPath=, configPath=, perltidy_profile=, cs_fixer_path=, fixers=, level=, max_line_length=79, indent_size=4, ignore=[E24], indent_size=4, indent_char= , rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , 
2015-06-27T13:34:59.229Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\index.coffee] beautifier autopep8 silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, silly=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, debug=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, verbose=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, info=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, warn=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, error=function (msg) {
      // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback])
      var args = [level].concat(Array.prototype.slice.call(arguments));
      target.log.apply(target, args);
    }, onLogging=function (handler) {
        var subscription;
        subscription = emitter.on('logging', handler);
        return subscription;
      }, languages=[Python]
2015-06-27T13:34:59.234Z - debug: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] tempFile input null path=C:\Users\WK\AppData\Local\Temp\input115527-242136-di78do, fd=0
2015-06-27T13:34:59.234Z - debug: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] exeName, args: autopep8 0=C:\Users\WK\AppData\Local\Temp\input115527-242136-di78do, 1=--max-line-length, 2=79, 3=--indent-size, 4=4, 5=--ignore, 6=E24
2015-06-27T13:34:59.246Z - debug: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] exePath, env: autopep8 ALLUSERSPROFILE=C:\ProgramData, APPDATA=C:\Users\WK\AppData\Roaming, asl.log=Destination=file, ATOM_HOME=C:\Users\WK\.atom, CommonProgramFiles=C:\Program Files (x86)\Common Files, CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files, CommonProgramW6432=C:\Program Files\Common Files, COMPUTERNAME=WK-PC, ComSpec=C:\Windows\system32\cmd.exe, FP_NO_HOST_CHECK=NO, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, HOMEDRIVE=C:, HOMEPATH=\Users\WK, LOCALAPPDATA=C:\Users\WK\AppData\Local, LOGONSERVER=\\WK-PC, NODE_ENV=production, NODE_PATH=C:\Users\WK\AppData\Local\atom\app-1.0.0\resources\app.asar\exports, NUMBER_OF_PROCESSORS=8, OS=Windows_NT, Path=C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Users\WK\AppData\Local\atom\bin, PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, PROCESSOR_ARCHITECTURE=x86, PROCESSOR_ARCHITEW6432=AMD64, PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel, PROCESSOR_LEVEL=6, PROCESSOR_REVISION=3a09, ProgramData=C:\ProgramData, ProgramFiles=C:\Program Files (x86), ProgramFiles(x86)=C:\Program Files (x86), ProgramW6432=C:\Program Files, PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\, PUBLIC=C:\Users\Public, SESSIONNAME=Console, SystemDrive=C:, SystemRoot=C:\Windows, TEMP=C:\Users\WK\AppData\Local\Temp, TMP=C:\Users\WK\AppData\Local\Temp, USERDOMAIN=WK-PC, USERNAME=WK, USERPROFILE=C:\Users\WK, windir=C:\Windows
2015-06-27T13:34:59.246Z - debug: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] spawn autopep8 0=C:\Users\WK\AppData\Local\Temp\input115527-242136-di78do, 1=--max-line-length, 2=79, 3=--indent-size, 4=4, 5=--ignore, 6=E24
2015-06-27T13:34:59.284Z - debug: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] spawn done 1 'autopep8' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

2015-06-27T13:34:59.285Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] spawn result 1  'autopep8' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

2015-06-27T13:34:59.285Z - verbose: [C:\Users\WK\.atom\packages\atom-beautify\src\beautifiers\beautifier.coffee] 'autopep8' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
 is not recognized as an internal or external command

@jmenges is this? thanks

Glavin001 commented 9 years ago

Could you run autopep8 and try it out in your Terminal? See https://pypi.python.org/pypi/autopep8/ for usage instructions. Also run which autopep8 and let us know the path to the executable.

jmenges commented 9 years ago

There is a windows equilant of which that is called where, so might need to use that. Also you might want to consider removing your goolgle api key from the debugging output.

manning23 commented 9 years ago

D:>python -m autopep8 -h 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] [--range line line] [--indent-size n] [files [files ...]]

Automatically formats Python code to conform to the PEP 8 style guide.

positional arguments: files files to format or '-' for standard in

optional arguments: -h, --help show this help message and exit --version show program's version number and exit -v, --verbose print verbose messages; multiple -v result in more verbose messages -d, --diff print the diff for the fixed source -i, --in-place make changes to files in place --global-config filename path to a global pep8 config file; if this file does not exist then this is ignored (default: C:\Users\WK.pep8) --ignore-local-config don't look for and apply local config files; if not passed, defaults are updated with any config files in the project's root directory -r, --recursive run recursively over directories; must be used with --in-place or --diff -j n, --jobs n number of parallel jobs; match CPU count if value is less than 1 -p n, --pep8-passes n maximum number of additional pep8 passes (default: infinite) -a, --aggressive enable non-whitespace changes; multiple -a result in more aggressive changes --experimental enable experimental fixes --exclude globs exclude file/directory names that match these comma- separated globs --list-fixes list codes for fixes; used by --ignore and --select --ignore errors do not fix these errors/warnings (default: E24) --select errors fix only these errors/warnings (e.g. E4,W) --max-line-length n set maximum allowed line length (default: 79) --range line line only fix errors found within this inclusive range of line numbers (e.g. 1 99); line numbers are indexed at

D:>python -m autopep8 --in-place --aggressive --aggressive sqli.py

@Glavin001 I can run autopep8 in cmd,but i can't run it in atom.

manning23 commented 9 years ago

I solved the problem,I found that this is my mistake,because i didn't put autopep8 in environment variable before, thank you for @jmenges and @Glavin001 :) PS: My english is too bad...

Glavin001 commented 9 years ago

Glad it worked out :smiley:.