-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find 'autopep8'. The program may not be installed. #396
Comments
|
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 Platform: darwin VersionsAtom Version: 0.208.0 Atom Beautify Version: 0.28.2 Original file to be beautifiedOriginal File Path: 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() Beautification optionsEditor Options: {
"_default": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false
}
} Config Options: {
"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: {
"_default": {}
} EditorConfig Options: {
"_default": {}
} Project Options: [
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
}
] ResultsBeautified File Contents: Error: Could not find 'autopep8'. The program may not be installed. Logs:
|
It is a user error because the required third-party package is not installed.
And the error message should also indicate to you that 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. 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
If you did not install the required
You do have to. Please install it simply with The 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 |
I'm having this same issue and I made sure I installed autopep8. When I run
I get
|
@psthompson , please run |
Atom Beautify - Debugging informationThe following debugging information was generated by Platform: darwin VersionsAtom Version: 1.0.0 Atom Beautify Version: 0.28.6 Original file to be beautifiedOriginal File Path: 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() Beautification optionsEditor Options: {
"_default": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false
}
} Config Options: {
"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: {
"_default": {}
} EditorConfig Options: {
"_default": {}
} Project Options: [
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
}
] Final Options: {
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false,
"max_line_length": 79,
"ignore": [
"E24"
]
} Package Settings: {
"_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
} ResultsBeautified File Contents: Error: Could not find 'autopep8'. The program may not be installed. Logs:
|
I see your Could you run |
I'm not getting any output when I run |
This is strange, @psthompson. There should have been a message that appeared along with
Note the advice to run Did this not appear? That would be a bug if it did not appear. |
OK, I un-installed autopep8 and re-installed and now I think I might have installed autopep8 using 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: #396 (comment) 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 . Atom Beautify - Debugging informationThe following debugging information was generated by Platform: darwin VersionsAtom Version: 1.0.0 Atom Beautify Version: 0.28.7 Original file to be beautifiedOriginal File Path: Original File Grammar: Python Original File Language: Python Original File Contents: SNIPBeautification optionsEditor Options: {
"_default": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false
}
} Config Options: {
"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: {
"_default": {}
} EditorConfig Options: {
"_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: [
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
}
] Final 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
} Package Settings: {
"_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
} ResultsBeautified File Contents: Error: Could not find 'autopep8'. The program may not be installed. Logs:
|
I installed autopep8 via pip and can run it via command line. |
I'm having the same problem with this as cpury |
Also having this issue on Windows.
It's also worth noting that debug logging shows two Path variables in different cases.
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. |
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 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.
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. |
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 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 |
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 ***@***.***> 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
<#396 (comment)>,
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.
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 |
@Glavin001 for sql, sqlformat 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 Looks like something went wrong trying to determine your environment variables:
This is the
What is the absolute path to your |
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.
This answers my question about I am going guess the path for However, I am not sure how |
Yes, it has no "/" in the beginning. echo $PATH which sqlformat which autopep8 I also think as long as anaconda/bin is there, all exe in that folder should be discoverable. |
I am not familiar with paths which do not have the leading slash (i.e. What does it mean without the leading Could you try changing to absolute path with a leading slash ( I found one link that suggests anaconda is located in your home directory: https://stackoverflow.com/a/19030049/2578205
I know the After changing, if it does not work still, please create another |
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, the beautifier didnt extract the path correctly.... echo $PATH which sqlformat |
Atom-Beautify extracted the environment variables as the following:
Yup. Atom-Beautify:
versus yours:
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 Therefore, please run in your Terminal the following: /bin/sh -ilc env And check the For convenience you could use the following to filter the results: /bin/sh -ilc env | grep "PATH=" If this works and shows the expected If the results are different, then I wonder what Shell you are using and/or how you are setting your You could determine the Shell you are currently using with: https://askubuntu.com/a/590902 echo $0 could return When I debug Atom-Beautify, it shows |
$ /bin/sh -ilc env | grep "PATH=" $ echo $0 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
So you need to also add it to The ideal setup -- what I personally use -- is having your |
So finally solved. Thanks for the help! @Glavin001 /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. |
I agree. There have been too many problems. While using I am adding a new feature called For more information on what I am working on see #1687 Thank you all for your patience! |
#1687 has been published to v0.30.0. You should now be able to configure the executable/script path in Atom-Beautify package settings: |
Same problem on For those who encounter this problem, reinstall the Thus, you could try to |
|
Message shown when trying to beautify a python file
The text was updated successfully, but these errors were encountered: