Closed tdbs closed 7 years ago
pip install autopep8
(do not use a virtual environment)autopep8
in your PATH environment variable? This is how Atom Beautify detects the installation of the program. If it is properly setup, then this should work without issues on both Mac, Linux, and Windows.Atom Beautify - Help Debug Editor
and let me know results.This is a user error, so I am going to close this.
However please comment back your details if you need more assistance getting started. I am working on documentation this more for users who are having trouble getting started. So feedback is welcome. Thanks.
How is this a user error? I installed you package, it works for js files and not for py files. If your package has extra dependencies you need to assure them, this is not a user error.
The following debugging information was generated by Atom Beautify
on Fri Jun 12 2015 12:47:14 GMT+0100 (WEST)
.
Platform: darwin
Atom Version: 0.208.0
Atom Beautify Version: 0.28.2
Original File Path: /Users/tiagosilva/Repositories/rz-app/data/mining/feeds/kuantokusta/request.py
Original File Grammar: Python
Original File Contents:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import datetime
import time
import os
import urllib2
import zipfile
feed = 'http://affiliate.kuantokusta.pt/export_feeds/export.php?token=2921c42d56557562130f18f3.62436657'
# feed = 'http://affiliate.kuantokusta.pt/export_feeds/export.php?token=10aa2af4d7536a4e98ee0740.87183889' #old feed
date = str(datetime.datetime.now().strftime('%Y-%m-%d-%H'))
# feed_folder = '/home/azureuser/rz-app/data/mining/feeds/kuantokusta/feed'
#local tests
feed_folder = "./feed/"
feed_filename_zipped = "pepfeed.zip"
feed_filename_unzipped = "pepfeed.xml"
feed_filename_dated = "KuantoKusta_{}.xml".format(date)
def fetch(source=None, destination=None):
print "Fetching KK feed ..."
#get file
request = urllib2.urlopen(source)
#save file
output = open(destination+'pepfeed.zip', "w")
output.write(request.read())
output.close()
def unzip(source=None, destination=None):
print "Unzipping %s ..." % source
with zipfile.ZipFile(source, "r") as z:
z.extractall(feed_folder)
#local tests
#z.extractall('/home/francisco/Desktop/feeds/')
def rename(f_old, f_new):
print "Renaming to %s" % f_new
os.rename(f_old, f_new)
def remove(f):
print "Removing %s ..." % f
os.remove(f)
#e.g: xml_split -s 10Mb KuantoKusta_2014-08-20-10.xml
def split_xml(feed_folder, sizeMB):
print "Splitting files....."
cmd = "xml_split -s {}Mb {}".format(sizeMB, feed_folder)
os.popen(cmd).read()
#e.g: ls KuantoKusta_2014-08-20-10*.xml | wc -l
def getNumberOfFiles(fileName):
print "Number of files:"
fileName = fileName.replace('.xml', '')
#local tests
#cmd = "ls /home/francisco/Desktop/feeds/{}*.xml | wc -l".format(fileName)
cmd = "ls /home/azureuser/rz-app/cronjobs/feeds/{}*.xml | wc -l".format(fileName)
number = os.popen(cmd).read()
return int(number)-1
def getFileNames(feed_folder, fileName):
numbers = getNumberOfFiles(fileName)
list_of_files = []
for i in range(1, numbers):
feed_folder = feed_folder.replace('.xml', '')
if i < 10:
list_of_files.append(feed_folder+"-0{}.xml".format(str(i)))
else:
list_of_files.append(feed_folder+"-{}.xml".format(str(i)))
return list_of_files
def requestFeed():
print datetime.datetime.now(), "KK request.py started"
fetch(source=feed, destination=feed_folder)
unzip(source=feed_folder+feed_filename_zipped, destination=feed_folder)
rename(feed_folder+feed_filename_unzipped, feed_folder+feed_filename_dated)
remove(feed_folder+feed_filename_zipped)
sizeMB = 10
split_xml(feed_folder+feed_filename_dated, sizeMB)
print "Done Splitting........"
listFiles = getFileNames(feed_folder+feed_filename_dated, feed_filename_dated)
print listFiles
print datetime.datetime.now(), "KK request.py finished"
if __name__ == "__main__":
requestFeed()
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
},
"rust": {
"rustfmt_path": ""
},
"sql": {
"indent_size": 4,
"keywords": "upper",
"identifiers": "lower"
},
"vala": {
"configPath": ""
}
}
Home Options:
Options from /Users/tiagosilva/.jsbeautifyrc
{
"_default": {}
}
EditorConfig Options: Options from EditorConfig file
{
"_default": {}
}
Project Options:
Options from .jsbeautifyrc
files starting from directory /Users/tiagosilva/Repositories/rz-app/data/mining/feeds/kuantokusta
and going up to root
[
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
}
]
Beautified File Contents:
Error: Could not find 'autopep8'. The program may not be installed.
Logs:
2015-06-12T11:47:14.806Z - info: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] beautify #!/usr/bin/python
# -*- coding: utf-8 -*-
import datetime
import time
import os
import urllib2
import zipfile
feed = 'http://affiliate.kuantokusta.pt/export_feeds/export.php?token=2921c42d56557562130f18f3.62436657'
# feed = 'http://affiliate.kuantokusta.pt/export_feeds/export.php?token=10aa2af4d7536a4e98ee0740.87183889' #old feed
date = str(datetime.datetime.now().strftime('%Y-%m-%d-%H'))
# feed_folder = '/home/azureuser/rz-app/data/mining/feeds/kuantokusta/feed'
#local tests
feed_folder = "./feed/"
feed_filename_zipped = "pepfeed.zip"
feed_filename_unzipped = "pepfeed.xml"
feed_filename_dated = "KuantoKusta_{}.xml".format(date)
def fetch(source=None, destination=None):
print "Fetching KK feed ..."
#get file
request = urllib2.urlopen(source)
#save file
output = open(destination+'pepfeed.zip', "w")
output.write(request.read())
output.close()
def unzip(source=None, destination=None):
print "Unzipping %s ..." % source
with zipfile.ZipFile(source, "r") as z:
z.extractall(feed_folder)
#local tests
#z.extractall('/home/francisco/Desktop/feeds/')
def rename(f_old, f_new):
print "Renaming to %s" % f_new
os.rename(f_old, f_new)
def remove(f):
print "Removing %s ..." % f
os.remove(f)
#e.g: xml_split -s 10Mb KuantoKusta_2014-08-20-10.xml
def split_xml(feed_folder, sizeMB):
print "Splitting files....."
cmd = "xml_split -s {}Mb {}".format(sizeMB, feed_folder)
os.popen(cmd).read()
#e.g: ls KuantoKusta_2014-08-20-10*.xml | wc -l
def getNumberOfFiles(fileName):
print "Number of files:"
fileName = fileName.replace('.xml', '')
#local tests
#cmd = "ls /home/francisco/Desktop/feeds/{}*.xml | wc -l".format(fileName)
cmd = "ls /home/azureuser/rz-app/cronjobs/feeds/{}*.xml | wc -l".format(fileName)
number = os.popen(cmd).read()
return int(number)-1
def getFileNames(feed_folder, fileName):
numbers = getNumberOfFiles(fileName)
list_of_files = []
for i in range(1, numbers):
feed_folder = feed_folder.replace('.xml', '')
if i < 10:
list_of_files.append(feed_folder+"-0{}.xml".format(str(i)))
else:
list_of_files.append(feed_folder+"-{}.xml".format(str(i)))
return list_of_files
def requestFeed():
print datetime.datetime.now(), "KK request.py started"
fetch(source=feed, destination=feed_folder)
unzip(source=feed_folder+feed_filename_zipped, destination=feed_folder)
rename(feed_folder+feed_filename_unzipped, feed_folder+feed_filename_dated)
remove(feed_folder+feed_filename_zipped)
sizeMB = 10
split_xml(feed_folder+feed_filename_dated, sizeMB)
print "Done Splitting........"
listFiles = getFileNames(feed_folder+feed_filename_dated, feed_filename_dated)
print listFiles
print datetime.datetime.now(), "KK request.py finished"
if __name__ == "__main__":
requestFeed()
[ { _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 },
rust: { rustfmt_path: '' },
sql: { indent_size: 4, keywords: 'upper', identifiers: 'lower' },
vala: { configPath: '' } },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} } ] Python /Users/tiagosilva/Repositories/rz-app/data/mining/feeds/kuantokusta/request.py
2015-06-12T11:47:14.806Z - verbose: [/Users/tiagosilva/.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, rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , , ,
2015-06-12T11:47:14.807Z - verbose: [/Users/tiagosilva/.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-12T11:47:14.807Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] [ '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, rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , , ,
2015-06-12T11:47:14.808Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true indent_size=4, indent_char= , indent_with_tabs=false
2015-06-12T11:47:14.809Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.809Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python indent_size=4, indent_char= , indent_with_tabs=false
2015-06-12T11:47:14.809Z - verbose: [/Users/tiagosilva/.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, rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python max_line_length=79, indent_size=4, ignore=[E24]
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python max_line_length=79, indent_size=4, ignore=[E24]
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.810Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.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-12T11:47:14.811Z - verbose: [/Users/tiagosilva/.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-12T11:47:14.812Z - verbose: [/Users/tiagosilva/.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], SHELL=/bin/bash, CLICOLOR=true, TMPDIR=/var/folders/vw/bkzpq4h50731sxs2d__hb2b40000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.z9kj7V81Wn/Render, ATOM_HOME=/Users/tiagosilva/.atom, USER=tiagosilva, COMMAND_MODE=unix2003, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.E6LHtMnpPr/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, LSCOLORS=gxfxcxdxbxCgCdabagacad, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin, PWD=/, EDITOR=vi, NODE_PATH=/Applications/Atom.app/Contents/Resources/app.asar/exports, XPC_FLAGS=0x0, PS1=\[$(tput setaf 7)\]\u@\[$(tput setaf 2)\]\h:\[$(tput setaf 4)\]\w\[$(tput setaf 1)\]$(parse_git_branch)\[$(tput sgr0)\] $ , NODE_ENV=production, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/tiagosilva, LOGNAME=tiagosilva, DISPLAY=/private/tmp/com.apple.launchd.nNXhj4jMfJ/org.macosforge.xquartz:0, _=/usr/bin/env, _envCacheDate=Fri Jun 12 2015 12:45:23 GMT+0100 (WEST)
2015-06-12T11:47:14.812Z - verbose: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/index.coffee] Python /Users/tiagosilva/Repositories/rz-app/data/mining/feeds/kuantokusta/request.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, rustfmt_path=, indent_size=4, keywords=upper, identifiers=lower, configPath=, , , , , , , , , ,
2015-06-12T11:47:14.813Z - verbose: [/Users/tiagosilva/.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], SHELL=/bin/bash, CLICOLOR=true, TMPDIR=/var/folders/vw/bkzpq4h50731sxs2d__hb2b40000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.z9kj7V81Wn/Render, ATOM_HOME=/Users/tiagosilva/.atom, USER=tiagosilva, COMMAND_MODE=unix2003, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.E6LHtMnpPr/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, LSCOLORS=gxfxcxdxbxCgCdabagacad, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin, PWD=/, EDITOR=vi, NODE_PATH=/Applications/Atom.app/Contents/Resources/app.asar/exports, XPC_FLAGS=0x0, PS1=\[$(tput setaf 7)\]\u@\[$(tput setaf 2)\]\h:\[$(tput setaf 4)\]\w\[$(tput setaf 1)\]$(parse_git_branch)\[$(tput sgr0)\] $ , NODE_ENV=production, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/tiagosilva, LOGNAME=tiagosilva, DISPLAY=/private/tmp/com.apple.launchd.nNXhj4jMfJ/org.macosforge.xquartz:0, _=/usr/bin/env, _envCacheDate=Fri Jun 12 2015 12:45:23 GMT+0100 (WEST)
2015-06-12T11:47:14.817Z - debug: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] tempFile input null path=/var/folders/vw/bkzpq4h50731sxs2d__hb2b40000gn/T/input115512-26773-6eenra, fd=84
2015-06-12T11:47:14.818Z - debug: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] exeName, args: autopep8 0=/var/folders/vw/bkzpq4h50731sxs2d__hb2b40000gn/T/input115512-26773-6eenra, 1=--max-line-length, 2=79, 3=--indent-size, 4=4, 5=--ignore, 6=E24
2015-06-12T11:47:14.843Z - debug: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] exePath, env: autopep8 SHELL=/bin/bash, CLICOLOR=true, TMPDIR=/var/folders/vw/bkzpq4h50731sxs2d__hb2b40000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.z9kj7V81Wn/Render, ATOM_HOME=/Users/tiagosilva/.atom, USER=tiagosilva, COMMAND_MODE=unix2003, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.E6LHtMnpPr/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, LSCOLORS=gxfxcxdxbxCgCdabagacad, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin, PWD=/, EDITOR=vi, NODE_PATH=/Applications/Atom.app/Contents/Resources/app.asar/exports, XPC_FLAGS=0x0, PS1=\[$(tput setaf 7)\]\u@\[$(tput setaf 2)\]\h:\[$(tput setaf 4)\]\w\[$(tput setaf 1)\]$(parse_git_branch)\[$(tput sgr0)\] $ , NODE_ENV=production, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/tiagosilva, LOGNAME=tiagosilva, DISPLAY=/private/tmp/com.apple.launchd.nNXhj4jMfJ/org.macosforge.xquartz:0, _=/usr/bin/env
2015-06-12T11:47:14.843Z - debug: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] spawn autopep8 0=/var/folders/vw/bkzpq4h50731sxs2d__hb2b40000gn/T/input115512-26773-6eenra, 1=--max-line-length, 2=79, 3=--indent-size, 4=4, 5=--ignore, 6=E24
2015-06-12T11:47:14.846Z - debug: [/Users/tiagosilva/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] error Error: spawn autopep8 ENOENT
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)
How is this a user error? I installed you package, it works for js files and not for py files. If your package has extra dependencies you need to assure them, this is not a user error.
It is a user error because the required third-party package is not installed. Indicated at https://github.com/Glavin001/atom-beautify#language-support
- Python
- Requires autopep8 to be already installed.
- Beautifies to PEP 8.
And the error message should also indicate to you that autopep8
must be installed and to go to https://github.com/hhatto/autopep8 for installation details.
See https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/autopep8.coffee#L24 for related code that causes this. If it does not indicate this, then that is a separate bug I should look into, as I want to clean up the error messages to make them more actionable / applicable to the users than the default Node.js errors (Node.js would just show ENOENT
and call it a day).
JavaScript is handled by a beautifier written in JavaScript (Node.js) and Python is handled by a beautifier (autopep8) written in Python. I have tried to migrate as much beautification over to Node.js packages, because then I am able to assure they are installed. Languages such as JavaScript and Python have their own package managers for installing software. I cannot simply handle all of these cases, their respective installers do. Anyone who uses that language (say Python) would also know about it's package manager (pip) and therefore find it trivial to appropriately install the package. Links to the documentation for their respective package should be indicated, in this case https://github.com/hhatto/autopep8
Consider I wanted to make Atom Beautify install these third-party, multi-language packages automatically (and I do, see #165): I would need to consider OS-specific package managers, such as Homebrew for Mac, apt-get for Ubuntu, chocolatey for Mac, and even those package managers are sometimes insufficient. Then I would need to consider the language-specific package managers, such as pip
for Python. Instead of allowing the human user to simply follow those instructions from the documentation for each third-party package, such as autopep8
, I would essentially have to develop a cross-platform (multi-OS), multi-language package management tool (wrapper) for automating this in Node.js that would be complex enough to automate what humans already would find easy to accomplish on their own by reading the documentation. To install autopep8
I would have to check for Python and pip, and installation of Python is OS-specific and there may be complications -- I've found Windows do be a major hassle lately as chocolately is not working most of the time.
Complications could be easily handled by a human user who knows to simply to Google and/or search on Stackoverflow for similar threads and could solve it in seconds/minutes. Whereas my automated counterpart in Atom Beautify, which would take significant development, would have little ability to be flexible here, and would need each and every case to be coded by hand -- whereas hopefully the OS and language package managers should handle these cases and/or provide documentation and support.
Ideally, the individual package managers for each OS and each language, should have their own support team and their own history of common issues that users can be easily resolved.
I also cannot simply download the source files for the packages, such as autopep8
as they may require other dependencies and may need additional installation. This should all be written in the package's documentation and therefore should not be duplicated in either Atom Beautify's documentation, or within its code.
I could have Atom Beautify detect that autopep8
is not installed and then run pip
, however there could be complications with that (see above) and still not be successful. I found it best to let human user handle this, and usually it is in their own preferred language, so they should have no problem.
Answering your questions: I didn't install (manually at least) autopep8, and i don't think i should have to, make it part of the installation if you have to.
If you did not install the required autopep8
then of course Atom Beautify will not work, for Python beautification.
pip install autopep8
autopep8 is not in my PATH, and again,i shouldn't have to worry about it
You do have to. Please install it simply with pip install autopep8
and if Python and pip were properly setup then it will automatically show up in your PATH
and you will have no problems.
The PATH
environment variable is a common convention across Operating Systems for finding available executables. See http://superuser.com/a/284351/426674 for more information. Atom Beautify uses it also to find executables. Essentially, if it is installed properly, which would mean the command line executable is in your PATH, then Atom Beautify should also be able to see it and therefore execute it. If you have installed autopep8 and do see it in your PATH, and still are having issues, then this is an Atom Beautify issue. Please let me know.
I can understand why you feel that you "shouldn't have to worry about it", however I hope that my explanation above will help you understand why it is much better for you to worry about it than Atom Beautify: it should be easy for you to install and takes time for me to develop something to automate this better. If installation is not easy, then it is up to each individual package maintainer to help improve their installation process.
Ok, i got the reasoning behind it, sorry for not reading through the whole readme, when i installed i used it only for js files.
Not a problem. Let me know if you still are having problems, after installing autopep8
. All Mac tests are currently passing so you should be good. :+1:
I'm having this same issue and I made sure I installed autopep8.
When I run
pip install autopep8
I get
Requirement already satisfied (use --upgrade to upgrade): autopep8 in ./Library/Python/2.7/lib/python/site-packages
Requirement already satisfied (use --upgrade to upgrade): pep8>=1.5.7 in /Library/Python/2.7/site-packages (from autopep8)
@psthompson , please run Atom Beautify - Help Debug Editor
and let me know results.
The following debugging information was generated by Atom Beautify
on Thu Jun 25 2015 16:28:24 GMT-0700 (PDT)
.
Platform: darwin
Atom Version: 1.0.0
Atom Beautify Version: 0.28.6
Original File Path: /Users/pthompson/Python/python-practice/ex16.py
Original File Grammar: Python
Original File Language: Python
Original File Contents:
from sys import argv
script, filename = argv
print "We're going to erase %r." % filename
print "If you don't want that, hit CTRL-C (^C)."
print "If you do want that, hit RETURN."
raw_input("?")
print "Opening the file..."
target = open(filename, 'w')
print "Truncating the file. Goodbye!"
target.truncate()
print "Now I'm going to ask you for three lines."
line1 = raw_input("line 1: ")
line2 = raw_input("line 2: ")
line3 = raw_input("line 3: ")
print "I'm going to write these to the file."
target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
print "And finally, we close it."
target.close()
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": 2,
"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": 2,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 2,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"sub",
"sup",
"b",
"i",
"u"
],
"end_with_newline": false
},
"java": {
"configPath": ""
},
"js": {
"indent_size": 2,
"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": 2,
"ignore": [
"E24"
]
},
"ruby": {
"indent_size": 2,
"indent_char": " "
},
"rust": {
"rustfmt_path": ""
},
"sql": {
"indent_size": 2,
"keywords": "upper",
"identifiers": "lower"
},
"vala": {
"configPath": ""
}
}
Home Options:
Options from /Users/pthompson/.jsbeautifyrc
{
"_default": {}
}
EditorConfig Options: Options from EditorConfig file
{
"_default": {}
}
Project Options:
Options from .jsbeautifyrc
files starting from directory /Users/pthompson/Python/python-practice
and going up to root
[
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
}
]
Final Options: Final combined options that are used
{
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false,
"max_line_length": 79,
"ignore": [
"E24"
]
}
Package Settings: The raw package settings options
{
"_analyticsUserId": "28d12332-66be-4f4d-92ed-ddaf89165914",
"language_python_beautify_on_save": true,
"analytics": true,
"_loggerLevel": "warn",
"beautifyEntireFileOnSave": true,
"muteUnsupportedLanguageErrors": false,
"muteAllErrors": false,
"cs_configPath": "",
"c_configPath": "",
"cpp_configPath": "",
"css_indent_size": 2,
"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": 2,
"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": 2,
"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": 2,
"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": 2,
"python_ignore": [
"E24"
],
"ruby_indent_size": 2,
"ruby_indent_char": " ",
"rust_rustfmt_path": "",
"sql_indent_size": 2,
"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_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
}
Beautified File Contents:
Error: Could not find 'autopep8'. The program may not be installed.
Logs:
2015-06-25T23:28:24.095Z - info: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] beautify from sys import argv
script, filename = argv
print "We're going to erase %r." % filename
print "If you don't want that, hit CTRL-C (^C)."
print "If you do want that, hit RETURN."
raw_input("?")
print "Opening the file..."
target = open(filename, 'w')
print "Truncating the file. Goodbye!"
target.truncate()
print "Now I'm going to ask you for three lines."
line1 = raw_input("line 1: ")
line2 = raw_input("line 2: ")
line3 = raw_input("line 3: ")
print "I'm going to write these to the file."
target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
print "And finally, we close it."
target.close()
[ { _default: { indent_size: 4, indent_char: ' ', indent_with_tabs: false } },
{ cs: { configPath: '' },
c: { configPath: '' },
cpp: { configPath: '' },
css:
{ indent_size: 2,
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: 2,
indent_char: ' ',
brace_style: 'collapse',
indent_scripts: 'normal',
wrap_line_length: 250,
wrap_attributes: 'auto',
wrap_attributes_indent_size: 2,
preserve_newlines: true,
max_preserve_newlines: 10,
unformatted: [Object],
end_with_newline: false },
java: { configPath: '' },
js:
{ indent_size: 2,
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: 2, ignore: [Object] },
ruby: { indent_size: 2, indent_char: ' ' },
rust: { rustfmt_path: '' },
sql: { indent_size: 2, keywords: 'upper', identifiers: 'lower' },
vala: { configPath: '' } },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} } ] Python /Users/pthompson/Python/python-practice/ex16.py undefined
2015-06-25T23:28:24.096Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] indent_size=4, indent_char= , indent_with_tabs=false, configPath=, configPath=, configPath=, indent_size=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=2, ignore=[E24], indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=, , , , , ,
2015-06-25T23:28:24.096Z - verbose: [/Users/pthompson/.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-25T23:28:24.096Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] Language Python supported
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.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=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=2, ignore=[E24], indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=, , , , , ,
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true indent_size=4, indent_char= , indent_with_tabs=false
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python indent_size=4, indent_char= , indent_with_tabs=false
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true configPath=, configPath=, configPath=, indent_size=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=2, ignore=[E24], indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python max_line_length=79, indent_size=2, ignore=[E24]
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python max_line_length=79, indent_size=2, ignore=[E24]
2015-06-25T23:28:24.097Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.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=2, 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-25T23:28:24.098Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options indent_size=2, indent_char= , indent_with_tabs=false, max_line_length=79, ignore=[E24]
2015-06-25T23:28:24.098Z - verbose: [/Users/pthompson/.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], SHELL=/bin/bash, TMPDIR=/var/folders/1q/3zt305p118qg1wt_8ssj7qy40000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.bEKBBjRiXe/Render, ATOM_HOME=/Users/pthompson/.atom, USER=pthompson, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LGbf5P0LRl/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin, PWD=/, NODE_PATH=/Applications/Atom.app/Contents/Resources/app.asar/exports, XPC_FLAGS=0x0, NODE_ENV=production, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/pthompson, LOGNAME=pthompson, DISPLAY=/private/tmp/com.apple.launchd.jT8BspoxDw/org.macosforge.xquartz:0, _=/usr/bin/env, _envCacheDate=Thu Jun 25 2015 16:16:10 GMT-0700 (PDT)
2015-06-25T23:28:24.099Z - verbose: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/index.coffee] Python /Users/pthompson/Python/python-practice/ex16.py { indent_size: 2,
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=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=2, ignore=[E24], indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=, , , , , ,
2015-06-25T23:28:24.099Z - verbose: [/Users/pthompson/.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], SHELL=/bin/bash, TMPDIR=/var/folders/1q/3zt305p118qg1wt_8ssj7qy40000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.bEKBBjRiXe/Render, ATOM_HOME=/Users/pthompson/.atom, USER=pthompson, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LGbf5P0LRl/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin, PWD=/, NODE_PATH=/Applications/Atom.app/Contents/Resources/app.asar/exports, XPC_FLAGS=0x0, NODE_ENV=production, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/pthompson, LOGNAME=pthompson, DISPLAY=/private/tmp/com.apple.launchd.jT8BspoxDw/org.macosforge.xquartz:0, _=/usr/bin/env, _envCacheDate=Thu Jun 25 2015 16:16:10 GMT-0700 (PDT)
2015-06-25T23:28:24.103Z - debug: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] tempFile input null path=/var/folders/1q/3zt305p118qg1wt_8ssj7qy40000gn/T/input115525-9204-1wugmvb, fd=56
2015-06-25T23:28:24.104Z - debug: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] exeName, args: autopep8 0=/var/folders/1q/3zt305p118qg1wt_8ssj7qy40000gn/T/input115525-9204-1wugmvb, 1=--max-line-length, 2=79, 3=--indent-size, 4=2, 5=--ignore, 6=E24
2015-06-25T23:28:24.137Z - debug: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] exePath, env: autopep8 SHELL=/bin/bash, TMPDIR=/var/folders/1q/3zt305p118qg1wt_8ssj7qy40000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.bEKBBjRiXe/Render, ATOM_HOME=/Users/pthompson/.atom, USER=pthompson, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LGbf5P0LRl/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin, PWD=/, NODE_PATH=/Applications/Atom.app/Contents/Resources/app.asar/exports, XPC_FLAGS=0x0, NODE_ENV=production, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/pthompson, LOGNAME=pthompson, DISPLAY=/private/tmp/com.apple.launchd.jT8BspoxDw/org.macosforge.xquartz:0, _=/usr/bin/env
2015-06-25T23:28:24.137Z - debug: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] spawn autopep8 0=/var/folders/1q/3zt305p118qg1wt_8ssj7qy40000gn/T/input115525-9204-1wugmvb, 1=--max-line-length, 2=79, 3=--indent-size, 4=2, 5=--ignore, 6=E24
2015-06-25T23:28:24.147Z - debug: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] error Error: spawn autopep8 ENOENT
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)
2015-06-25T23:28:24.149Z - debug: [/Users/pthompson/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] error Error: spawn autopep8 ENOENT
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)
I see your PATH
environment variable is PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin
.
Could you run which autopep8
and see if it is /usr/local/bin/autopep8
or otherwise. Let me know it's results.
I'm not getting any output when I run which autopep8
so I guess that's a sign of a problem.
This is strange, @psthompson. There should have been a message that appeared along with Could not find 'autopep8'. The program may not be installed.
that said along the lines of
Your program is properly installed if running 'which autopep8' in your Terminal returns an absolute path to the executable. If this does not work then you have not installed the program correctly and so Atom Beautify will not find the program.
Note the advice to run which autopep8
to confirm proper installation.
Did this not appear? That would be a bug if it did not appear.
OK, I un-installed autopep8 and re-installed and now which autopep8
shows /usr/local/bin/autopep8
I think I might have installed autopep8 using --user
the first time.
Everything (including Atom Beautify) seems to be working now. Thanks.
Great! @psthompson could you confirm that the message did not appear properly? See comment above: https://github.com/Glavin001/atom-beautify/issues/396#issuecomment-115432437 If this is not working then I need to know and need to fix it. Thanks.
That message did appear when it wasn't working.
I also needed to uninstall, both pep8 and autopep8, then re-install with:
sudo pip install autopep8
Without the sudo, which autopep8 returns nothing.
Hi @Glavin001 . I'm having this same problem, however I do have autopep8 installed, and can use it just fine from the command line. FYI, the directory is in my PATH (/usr/local/bin).
The following debugging information was generated by Atom Beautify
on Tue Jul 07 2015 14:20:23 GMT-0700 (PDT)
.
Platform: darwin
Atom Version: 1.0.0
Atom Beautify Version: 0.28.7
Original File Path: /Users/areksredzki/Dropbox/UBC/Sailbot/Public/routemaking/rpi_testing_controller.py
Original File Grammar: Python
Original File Language: Python
Original File Contents:
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
{
"python": {
"indent_size": 4,
"max_line_length": 79,
"ignore": [
"E24"
]
},
"cs": {
"configPath": ""
},
"c": {
"configPath": ""
},
"cpp": {
"configPath": ""
},
"css": {
"indent_size": 2,
"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": 2,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 2,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"sub",
"sup",
"b",
"i",
"u"
],
"end_with_newline": false
},
"java": {
"configPath": ""
},
"js": {
"indent_size": 2,
"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": ""
},
"ruby": {
"indent_size": 2,
"indent_char": " "
},
"rust": {
"rustfmt_path": ""
},
"sql": {
"indent_size": 2,
"keywords": "upper",
"identifiers": "lower"
},
"vala": {
"configPath": ""
}
}
Home Options:
Options from /Users/areksredzki/.jsbeautifyrc
{
"_default": {}
}
EditorConfig Options: Options from EditorConfig file
{
"_default": {
"indent_style": "space",
"indent_size": 4,
"end_of_line": "lf",
"charset": "utf-8",
"trim_trailing_whitespace": true,
"insert_final_newline": true,
"tab_width": 4,
"indent_char": " "
}
}
Project Options:
Options from .jsbeautifyrc
files starting from directory /Users/areksredzki/Dropbox/UBC/Sailbot/Public/routemaking
and going up to root
[
{
"_default": {}
},
{
"_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"
],
"indent_style": "space",
"end_of_line": "lf",
"charset": "utf-8",
"trim_trailing_whitespace": true,
"insert_final_newline": true,
"tab_width": 4
}
Package Settings: The raw package settings options
{
"_analyticsUserId": "af5aa53d-a6a3-449e-bdb2-4d7a55c7bfc6",
"language_css_default_beautifier": "Pretty Diff",
"beautifyEntireFileOnSave": false,
"python_indent_size": 4,
"analytics": true,
"_loggerLevel": "warn",
"muteUnsupportedLanguageErrors": false,
"muteAllErrors": false,
"cs_configPath": "",
"c_configPath": "",
"cpp_configPath": "",
"css_indent_size": 2,
"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": 2,
"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": 2,
"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": 2,
"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_ignore": [
"E24"
],
"ruby_indent_size": 2,
"ruby_indent_char": " ",
"rust_rustfmt_path": "",
"sql_indent_size": 2,
"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_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
}
Beautified File Contents:
Error: Could not find 'autopep8'. The program may not be installed.
Logs:
2015-07-07T21:20:23.486Z - info: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] beautify
### SNIP
[ { _default: { indent_size: 4, indent_char: ' ', indent_with_tabs: false } },
{ python: { indent_size: 4, max_line_length: 79, ignore: [Object] },
cs: { configPath: '' },
c: { configPath: '' },
cpp: { configPath: '' },
css:
{ indent_size: 2,
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: 2,
indent_char: ' ',
brace_style: 'collapse',
indent_scripts: 'normal',
wrap_line_length: 250,
wrap_attributes: 'auto',
wrap_attributes_indent_size: 2,
preserve_newlines: true,
max_preserve_newlines: 10,
unformatted: [Object],
end_with_newline: false },
java: { configPath: '' },
js:
{ indent_size: 2,
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: '' },
ruby: { indent_size: 2, indent_char: ' ' },
rust: { rustfmt_path: '' },
sql: { indent_size: 2, keywords: 'upper', identifiers: 'lower' },
vala: { configPath: '' } },
{ _default: {} },
{ _default:
{ indent_style: 'space',
indent_size: 4,
end_of_line: 'lf',
charset: 'utf-8',
trim_trailing_whitespace: true,
insert_final_newline: true,
tab_width: 4,
indent_char: ' ' } },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} },
{ _default: {} } ] Python /Users/areksredzki/Dropbox/UBC/Sailbot/Public/routemaking/rpi_testing_controller.py undefined
2015-07-07T21:20:23.486Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] indent_size=4, indent_char= , indent_with_tabs=false, indent_size=4, max_line_length=79, ignore=[E24], configPath=, configPath=, configPath=, indent_size=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=, indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=, , indent_style=space, indent_size=4, end_of_line=lf, charset=utf-8, trim_trailing_whitespace=true, insert_final_newline=true, tab_width=4, indent_char= , , , , , , ,
2015-07-07T21:20:23.488Z - verbose: [/Users/areksredzki/.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-07-07T21:20:23.488Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] Language Python supported
2015-07-07T21:20:23.488Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] getOptions selections [ 'python' ] indent_size=4, indent_char= , indent_with_tabs=false, indent_size=4, max_line_length=79, ignore=[E24], configPath=, configPath=, configPath=, indent_size=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=, indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=, , indent_style=space, indent_size=4, end_of_line=lf, charset=utf-8, trim_trailing_whitespace=true, insert_final_newline=true, tab_width=4, indent_char= , , , , , , ,
2015-07-07T21:20:23.489Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true indent_size=4, indent_char= , indent_with_tabs=false
2015-07-07T21:20:23.489Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.489Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python indent_size=4, indent_char= , indent_with_tabs=false
2015-07-07T21:20:23.489Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true indent_size=4, max_line_length=79, ignore=[E24], configPath=, configPath=, configPath=, indent_size=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=, indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python indent_size=4, max_line_length=79, ignore=[E24]
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python indent_size=4, max_line_length=79, ignore=[E24]
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true indent_style=space, indent_size=4, end_of_line=lf, charset=utf-8, trim_trailing_whitespace=true, insert_final_newline=true, tab_width=4, indent_char=
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python indent_style=space, indent_size=4, end_of_line=lf, charset=utf-8, trim_trailing_whitespace=true, insert_final_newline=true, tab_width=4, indent_char=
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.490Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] true
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python undefined
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options python
2015-07-07T21:20:23.491Z - verbose: [/Users/areksredzki/.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=2, 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-07-07T21:20:23.492Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] options indent_size=4, indent_char= , indent_with_tabs=false, max_line_length=79, ignore=[E24], indent_style=space, end_of_line=lf, charset=utf-8, trim_trailing_whitespace=true, insert_final_newline=true, tab_width=4
2015-07-07T21:20:23.492Z - verbose: [/Users/areksredzki/.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], , _envCacheDate=Tue Jul 07 2015 14:18:19 GMT-0700 (PDT)
2015-07-07T21:20:23.492Z - verbose: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/index.coffee] Python /Users/areksredzki/Dropbox/UBC/Sailbot/Public/routemaking/rpi_testing_controller.py { indent_size: 4,
indent_char: ' ',
indent_with_tabs: false,
max_line_length: 79,
ignore: [ 'E24' ],
indent_style: 'space',
end_of_line: 'lf',
charset: 'utf-8',
trim_trailing_whitespace: true,
insert_final_newline: true,
tab_width: 4 } indent_size=4, indent_char= , indent_with_tabs=false, indent_size=4, max_line_length=79, ignore=[E24], configPath=, configPath=, configPath=, indent_size=2, 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=2, indent_char= , brace_style=collapse, indent_scripts=normal, wrap_line_length=250, wrap_attributes=auto, wrap_attributes_indent_size=2, preserve_newlines=true, max_preserve_newlines=10, unformatted=[a, sub, sup, b, i, u], end_with_newline=false, configPath=, indent_size=2, 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=, indent_size=2, indent_char= , rustfmt_path=, indent_size=2, keywords=upper, identifiers=lower, configPath=, , indent_style=space, indent_size=4, end_of_line=lf, charset=utf-8, trim_trailing_whitespace=true, insert_final_newline=true, tab_width=4, indent_char= , , , , , , ,
2015-07-07T21:20:23.493Z - verbose: [/Users/areksredzki/.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], , _envCacheDate=Tue Jul 07 2015 14:18:19 GMT-0700 (PDT)
2015-07-07T21:20:23.496Z - debug: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] tempFile input null path=/var/folders/10/jj4bqf0122j29psfsgkjw0t80000gn/T/input11567-97238-1c8q83q, fd=37
2015-07-07T21:20:23.497Z - debug: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] exeName, args: autopep8 0=/var/folders/10/jj4bqf0122j29psfsgkjw0t80000gn/T/input11567-97238-1c8q83q, 1=--max-line-length, 2=79, 3=--indent-size, 4=4, 5=--ignore, 6=E24
2015-07-07T21:20:23.628Z - debug: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] exePath, env: autopep8
2015-07-07T21:20:23.628Z - debug: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] spawn autopep8 0=/var/folders/10/jj4bqf0122j29psfsgkjw0t80000gn/T/input11567-97238-1c8q83q, 1=--max-line-length, 2=79, 3=--indent-size, 4=4, 5=--ignore, 6=E24
2015-07-07T21:20:23.634Z - debug: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] error Error: spawn autopep8 ENOENT
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)
2015-07-07T21:20:23.635Z - debug: [/Users/areksredzki/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] error Error: spawn autopep8 ENOENT
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)
I installed autopep8 via pip and can run it via command line. which autopep8
returns /usr/local/bin/autopep8
.
Still getting this error :(
I'm having the same problem with this as cpury I also reinstalled autopep8 but still beautify won't work
Also having this issue on Windows.
> where.exe autopep8 C:\Users\User\AppData\Local\Programs\Python\Python35-32\Scripts\autopep8.exe
It's also worth noting that debug logging shows two Path variables in different cases.
PATH: "C:\Users\User\AppData\Local\Programs\Python\Python35-32;;/usr/local/bin;/usr/bin;/bin;/usr/sbin;/sbin"
Path: "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 (x86)\Skype\Phone\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Users\User\AppData\Local\Programs\Python\Python35-32\;C:\Users\User\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\User\AppData\Local\Programs\Python\Python35-32\;C:\Users\User\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\User\cmder;C:\Users\User\AppData\Local\atom\bin"
The former variable doesn't make a lot of sense to me, as those are *nix paths and I'm on Windows.
I have the same issue: autopep8 is installed, I can use it from the command line, and where.exe finds it.
I have tried setting the autopep8 path manually in the configs (config.cson and .jsbeautifyrc) but I'm not sure if I did it correctly.
Would be good to know how to set this path manually.
Same problem, autopep8 is installed, if I run where.exe autopep8 it returns the correct path, if I simply type autopep8 into the command line it works but beautify still can't find it. Why was the option to manually set the path removed?
Just FYI - the autopep8 package works as a replacement if anyone else has issues with this.
Why was the option to manually set the path removed?
The idea was that the executable paths would be automatically detected from a properly setup PATH environment variable. While it works and tests are passing (Travis CI and AppVeyor, with except of unrelated beautification issues) there appear to be difficulties getting the PATH setup properly; Windows in particular has been having a lot of issues. I tried to use cross-spawn
to improve Windows support, however that backfired creating even more Atom-Beautify issues related to failed installation, so it has since been removed.
Given the difficulties and that this issue is blocking users from using Atom-Beautify, I recommend someone that is experiencing these issues submit a Pull Request that resolves the problem. Here are some potentially helpful notes:
autopep8_path
to Python language file and using it in the autopep8 beautifierrustfmt_path
This Pull Request should be very quick and straightforward to implement, as you will see from the Rust & rustfmt example. I want to make sure it works so I encourage someone who is experiencing this issue to make these appropriate changes. Please let me know if you have any questions or need help. Once you submit a Pull Request, I want to review and merge this ASAP. Thank you for your patience.
I'd be happy to make the changes and give it a test, but I'm not sure how to build the plugin or install a package that isn't in the Atom.io collection.
EDIT: Ignore me, I'm an idiot. Did not realise they weren't compiled. Testing now.
EDIT2: I've made those changes but I can't get the option to show in settings. I've not done this before, but I've cloned the dev version, made the changes and open Atom in Dev mode, I've also tried manually editing options.md but I can get it to show. Any ideas?
“sudo pip install autopep8 ”
This command solved my problem
[autopep, Python, Windows] so I've been spening some time on figuring out what'd work for me. Nothing provided here did but the simple fix for me was to change the autopep8 in https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/autopep8.coffee#L17 to the full file path of the autopep8.exe, in the Scripts folder of my Python installation.
I installed autopep8
with and without sudo
on macOS Sierra, but atom-beautify
still won't find the executable.
I resorted to @JeWe37's workaround (thanks!) now, which works fine, but isn't ideal because I guess it wouldn't survive a package upgrade changing the respective file.
@Glavin001, wouldn't it make sense to just make the path to autopep8
configurable in the package options considering how much trouble people have setting this up properly? If I'm not mistaken you took this approach for other beautifiers, too, so why not here?
FYI - I'm on a mac at work with no administrator access. I can download and run atom from the desktop but I can't install pip.
Not sure if this can be fixed, just wanted to provide perspective. Excellent work on this package sir.
@vidoardes - did you ever get around this, or did you give up? I know it's been quite a while, but I'd like to ask anyway.
@Glavin001 - I'm surprised this hasn't been resolved yet, given how easily you suggested adding the path option would be. I took a spin at it and I managed to get the path option to at least show up in the settings menu by mimicking the rust files you referenced. However, I'm getting a reference error for the help file now. I don't really know my way around coffeescript, so it's like the blind leading the blind over here. Any pointers?
I did get round it, by moving to VS Code :P
On Tue, 9 May 2017 at 05:38 raistael notifications@github.com wrote:
@vidoardes https://github.com/vidoardes - did you ever get around this, or did you give up? I know it's been quite a while, but I'd like to ask anyway.
@Glavin001 https://github.com/Glavin001 - I'm surprised this hasn't been resolved yet, given how easily you suggested adding the path option would be. I took a spin at it and I managed to get the path option to at least show up in the settings menu by mimicking the rust files you referenced. However, I'm getting a reference error for the help file now. I don't really know my way around coffeescript, so it's like the blind leading the blind over here. Any pointers?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/Glavin001/atom-beautify/issues/396#issuecomment-300059257, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgR1uXCAxJ-8xbKSuyv_Z-zpFT3EgEbks5r3-2ogaJpZM4E_1Rl .
@vidoardes makes sense. I use it for other things. Might as well for Python too
I am also having the same Problem. My autopep8 is already installed. here is python response. I already added PATH variables.
(C:\dev\Anaconda) C:\Users\Harsh Patel>pip install autopep8 Requirement already satisfied: autopep8 in c:\dev\anaconda\lib\site-packages Requirement already satisfied: pycodestyle>=2.3 in c:\dev\anaconda\lib\site-packages (from autopep8)
It is Annoying that every time you try to save the code, there is big notif saying something is not working
Same here on Mac OS...Nither autopep8 or sqlformat can be found.. Both are installed and export into path.
Can everyone experiencing these issues please create a debug.md
Gist and provide the link to it here? See https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md#how-to-create-debugmd-gist for details. Without it I cannot help you debug. Thank you.
@Glavin001 for python, autopep8 https://gist.github.com/lancerts/13e291b19915e11226c377410b528159
for sql, sqlformat https://gist.github.com/lancerts/19c66715e3109659c4d580612132546b
I install packages also in linux and beautify simply work but I have no luck with my mac. Currently, autopep8 can be found via echo $PATH.
@lancerts thanks! Could you change the name from atom-beautify-debug
to atom-beautify-debug.md
(note the .md
extension) so the formatting and links work correctly 😝. More important for next time, I'll review these regardless right now.
Looks like something went wrong trying to determine your environment variables:
2017-06-03T16:41:42.466Z - debug: [beautifiers/beautifier.coffee] exePath, env: sqlformat SHELL=/bin/sh, TMPDIR=/var/folders/dg/jxsw2s955c1f91h17nxqm4hm395n3_/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.URXXWNAhzW/Render, ATOM_HOME=/Users/shaotang/.atom, USER=shaotang, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.AkYmXDzatN/Listeners, __CF_USER_TEXT_ENCODING=0x692D46A:0x0:0x0, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin, PWD=/, NODE_PATH=/private/var/folders/dg/jxsw2s955c1f91h17nxqm4hm395n3_/T/AppTranslocation/A364F3DB-817E-4C28-BB40-88910B7607CE/d/Atom 2.app/Contents/Resources/app/exports, XPC_FLAGS=0x0, NODE_ENV=production, XPC_SERVICE_NAME=0, HOME=/Users/shaotang, SHLVL=2, LOGNAME=shaotang, _=/usr/bin/env
This is the PATH
which was extracted:
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
What is the absolute path to your autopep8
and sqlformat
executables?
If you echo $PATH
in your shell what is the result?
Will add .md next time, sorry for the inconvenience. So echo $PATH anaconda/bin/pep8:anaconda/bin/autopep8:anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
Will add .md next time, sorry for the inconvenience.
No worries 😄 . You're not the first and won't be the last person to do this.
echo $PATH anaconda/bin/pep8:anaconda/bin/autopep8:anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
This answers my question about echo $PATH
, however what about autopep8
and sqlformat
's path? Can you confirm by running which autopep8
and which sqlformat
?
I am going guess the path for autopep8
is anaconda/bin/autopep8
. Given this assumption, I would expect your PATH
to look something like anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
. Notice the removal of anaconda/bin/pep8:anaconda/bin/autopep8
because the PATH
is for directories not file paths. Thus by including anaconda/bin
already it should work for all programs includes in the directory named anaconda/bin
.
However, I am not sure how anaconda/bin
works. Every single one of my entries added to PATH
is an absolute path (i.e. starts with /
). Are you sure you do not mean /anaconda/bin
instead?
Yes, it has no "/" in the beginning.
echo $PATH anaconda/bin/pep8:anaconda/bin/autopep8:anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
which sqlformat anaconda/bin/sqlformat
which autopep8 anaconda/bin/autopep8
I also think as long as anaconda/bin is there, all exe in that folder should be discoverable.
Yes, it has no "/" in the beginning.
I am not familiar with paths which do not have the leading slash (i.e. /
) or leading $HOME
(i.e. ~
). I would expect it to be in root (i.e. /anaconda/bin
) or in your home directory (i.e. ~/anaconda/bin
which expands to $HOME/anaconda/bin
which then expands the variable to your user specific path).
What does it mean without the leading /
? Is it implied /
(root) or implied home directory (i.e. $HOME/
or ~/
)? I do not know.
Could you try changing to absolute path with a leading slash (/
) to match all of the others in your PATH
are? This is very strange to me.
I found one link that suggests anaconda is located in your home directory: https://stackoverflow.com/a/19030049/2578205
export PATH=$HOME/anaconda/bin:$PATH
I know the PATH
environment variables works, since I use it personally and our Travis CI build also uses it, and this missing leading /
is the only thing I see which is clearly strange. Hopefully making the path absolute in PATH
will resolve the issue.
After changing, if it does not work still, please create another debug.md
. Thanks!
I really want to focus on improving the installation experience for users. I have created a new Issue, #1687, to target this problem. Please provide your feedback! Thanks in advance.
After changing things, it is still not working, debug.md https://gist.github.com/lancerts/8e7ffe85410e8bd12a987fc97b308f84
the beautifier didnt extract the path correctly....
echo $PATH /Users/shaotang/anaconda/bin:anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
which sqlformat /Users/shaotang/anaconda/bin/sqlformat
Atom-Beautify extracted the environment variables as the following:
2017-06-04T18:22:23.461Z - debug: [beautifiers/beautifier.coffee] exePath, env: sqlformat SHELL=/bin/sh, TMPDIR=/var/folders/dg/jxsw2s955c1f91h17nxqm4hm395n3_/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.3jIBGirfha/Render, ATOM_HOME=/Users/shaotang/.atom, USER=shaotang, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.bFu8IUiPEL/Listeners, __CF_USER_TEXT_ENCODING=0x692D46A:0x0:0x0, GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q, PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin, PWD=/, NODE_PATH=/private/var/folders/dg/jxsw2s955c1f91h17nxqm4hm395n3_/T/AppTranslocation/8FF9A651-47C4-4641-9969-8017233F9591/d/Atom 2.app/Contents/Resources/app/exports, XPC_FLAGS=0x0, NODE_ENV=production, XPC_SERVICE_NAME=0, HOME=/Users/shaotang, SHLVL=2, LOGNAME=shaotang, _=/usr/bin/env
the beautifier didnt extract the path correctly....
Yup.
Atom-Beautify:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
versus yours:
/Users/shaotang/anaconda/bin:anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
Atom-Beautify does cache the environment variables, however it clears them every 10 seconds: https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/beautifier.coffee#L141-L149
You could try reloading/restart Atom before re-testing, if you have not already.
This is the important line: https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/beautifier.coffee#L163
child = spawn process.env.SHELL, ['-ilc', 'env'],
That is how your environment variables are extracted from the configured Shell.
Your logs show SHELL=/bin/sh
.
Therefore, please run in your Terminal the following:
/bin/sh -ilc env
And check the PATH
again.
For convenience you could use the following to filter the results:
/bin/sh -ilc env | grep "PATH="
If this works and shows the expected PATH
, then I am stumped as to why Atom-Beautify does not return the same results.
If the results are different, then I wonder what Shell you are using and/or how you are setting your PATH
environment variable? Is it in a ~/.bashrc
file?
You could determine the Shell you are currently using with: https://askubuntu.com/a/590902
echo $0
could return -bash
, for example. Personally, I am using zsh
instead of Bash, however the tests pass on Travis CI with standard setup so this is a non-issue: https://github.com/Glavin001/atom-beautify/blob/master/.travis.yml
When I debug Atom-Beautify, it shows SHELL=/bin/zsh
which is correct. However, /bin/sh
may be incorrect for you. Therefore it may be you need to configure your system properly to know its default Shell. See https://stackoverflow.com/a/26321141/2578205 for details.
$ /bin/sh -ilc env | grep "PATH=" PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/shaotang/anaconda/bin:anaconda/bin
$ echo $0 -sh
I set the path variable through bash_profile file on the MAC OS system.
I set the path variable through bash_profile file on the MAC OS system.
There's the problem 😄 . See https://apple.stackexchange.com/a/51038
.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.
So you need to also add it to .bashrc
for it to work.
The ideal setup -- what I personally use -- is having your .bash_profile
pull in the .bashrc
file so you only need to make changes to one place, the .bashrc
file. See https://apple.stackexchange.com/a/51043 for details. With this setup, you would not have these issues.
So finally solved. Thanks for the help! @Glavin001 Here is a summary for others, in my situation (Mac OS): Open a terminal freshly, echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
I need to EITHER source ~/.bash_profile or ~/.bashrc first. Then echo $PATH /Users/shaotang/anaconda/bin:anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
Since I have set in Terminals->preference->shell-> startup run command: source ~/.bash_profile, I didnt notice the issue.
At least in my case, neither ~/.bash_profile nor ~/.bashrc is sourced when starting a shell.
Solution: put everything in ~/.bashrc and
put
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
into ~/.profile.... All the paths will be recognized when opening a terminal freshly!
It is the ~/.profile file...
wouldn't it make sense to just make the path to autopep8 configurable in the package options considering how much trouble people have setting this up properly? - @anothernode in https://github.com/Glavin001/atom-beautify/issues/396#issuecomment-296429717
I agree. There have been too many problems. While using PATH
should allow any properly configured system to work -- and do work successfully in all of my tests, including on Travis CI (Mac + Ubuntu) and AppVeyor (Windows) -- it seems there are too many other factors at play making this still a major issue.
I am adding a new feature called Executables
which encapsulates these binary/script based beautifiers into smarter units. These Executables know how to determine if they are working, what version is currently installed, and also expose optional configurable settings, such as the executable's path. This means every non-Node.js beautifier will automatically have an option in Atom-Beautify package settings to customize their executable path. If this path setting is not configured, it will try to determine the path on its own (which fails for some users).
For more information on what I am working on see https://github.com/Glavin001/atom-beautify/issues/1687
Thank you all for your patience!
Same problem on OSX
.
For those who encounter this problem, reinstall the autopep8
may solve this problem.
I guess that's because when you pip install autopep8 --user
on mac, it could not generate the excutable files to the /usr/bin
path due to the permission.
Thus, you could try to reinstall
it with sudo
command.
Message shown when trying to beautify a python file