-
Notifications
You must be signed in to change notification settings - Fork 453
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
autopep8 not found, but it is in the PATH #1030
Comments
Maybe we should look for an "autopep8", but open "python -m autopep8" or "python3 -m autopep8"? |
Please follow the issue template provided. More specifically, adding a link to the required |
DescriptionBeautification with Input Before BeautificationThis is what the code looked like before: """
Reference: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.stats.ks_2samp.html
"""
from scipy import stats
import numpy as np
def main():
np.random.seed( 12345678 )
n1 = 200
n2 = 300
# Generate random variates from a normal distribution
rvs1 = stats.norm.rvs(loc=0, scale=1, size=n1)
rvs2 = stats.norm.rvs(loc=0.5, scale=1.5, size=n2)
print(stats.ks_2samp(rvs1, rvs2))
if __name__ == '__main__':
main() Expected OutputThe beautified code should have looked like this: """
Reference: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.stats.ks_2samp.html
"""
from scipy import stats
import numpy as np
def main():
np.random.seed(12345678)
n1 = 200
n2 = 300
# Generate random variates from a normal distribution
rvs1 = stats.norm.rvs(loc=0, scale=1, size=n1)
rvs2 = stats.norm.rvs(loc=0.5, scale=1.5, size=n2)
print(stats.ks_2samp(rvs1, rvs2))
if __name__ == '__main__':
main() Actual OutputBeautification fails with error message: Could not find 'autopep8'. The program may not be installed.
See https://github.com/hhatto/autopep8#installation for program installation instructions.
You can configure Atom Beautify with the absolute path to 'autopep8' by setting 'Executable - autopep8 - Path' in the Atom Beautify package settings.
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. Atom Beautify requires that the program be found in your PATH environment variable.
Note that this is not an Atom Beautify issue if beautification does not work and the above command also does not work: this is expected behaviour, since you have not properly installed your program. Please properly setup the program and search through existing Atom Beautify issues before creating a new issue. See https://github.com/Glavin001/atom-beautify/search?q=autopep8&type=Issues for related Issues and https://github.com/Glavin001/atom-beautify/tree/master/docs for documentation. If you are still unable to resolve this issue on your own then please create a new issue and ask for help. For reference: $ which autopep8
/home/mcf/anaconda3/bin/autopep8 and $ autopep8 --in-place example.py where Steps to Reproduce
DebugHere is a link to the ChecklistI have:
|
Hi @matthewfeickert. I have found what I think is the bug from your logs:
Basically when So instead of parsing line:
It is parsing:
Which is empty string, and of course fails. I'm going to try and fix this now. Thank you for bringing this bug to my attention! |
Fixed. Release coming soon! |
Published patch to v0.30.1 Please provide the above information if the latest release does not improve things for you. Thanks! |
Currently using the v0.30.1 on Arch (Manjaro) : which autopep8
autopep8 --version
Error: Could not find 'autopep8'. The program may not be installed. Thank your for working on that ^.^ |
@TheLaluka: Please follow the issue template provided. More specifically, adding a link to the required |
Looks like this versioning format may not be supported. Is there a stable release you could use instead? The Executable (see https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/autopep8.coffee#L19 ) expects it to be looking like I will try to fix this and publish a release ASAP. Thanks! |
Well, quite busy atm so i'll work on something else and wait for a fix (or just write tabs by hand, we're too lazy duh) |
@Glavin001 I can confirm that things are (mostly) working on my end now. Thanks for the speedy fix! I say mostly as occasionally executing the keyboard shortcut contents of
However, I can't reproduce this enough to say what this bug would be, so for the time being I think everything is good to go. 👍 |
Published fixes to v0.30.2 @TheLaluka should work now. If not, I will need a |
Works like a charm, thank you for the quick support ! |
* master: (79 commits) Update changelog [skip ci] Prepare 0.30.2 release Fixes Glavin001#1030. Add support for alpha versions of autopep8 Fixes Glavin001#1725. Fix version parsing of PHP executable Fixes Glavin001#1730. Correctly parse PHPCBF version and improve handling of Executable See Glavin001#1708. Re-generate documentation for Fortran file extension changes Prepare 0.30.1 release Prepare changelog for v0.30.1 See Glavin001#1725. Update changelog Fixes Glavin001#1725. Improve PHP-CS-Fixer support with handling script path Update changelog. See Glavin001#1030. Fix Glavin001#1030. Autopep8 Executable did not handle older and newer versions Prepare 0.30.0 release See Glavin001#1687. Update README, remove note about Executables now that it is supported See Glavin001#1687. Update Changelog with info about Executables Add Greenkeeper badge See Glavin001#1687. Update README docs to include details about Executables and Docker support Add more dependencies to next-update and greenkeep ignore list See Glavin001#1687. Fix typos in Travis CI config See Glavin001#1687. Install Sass-convert and Uncrustify beautifiers via Docker for Linux Travis CI build ... # Conflicts: # README.md
Description
I am using anaconda on a windows terminal server as python distribution. autopep8 is installed and is in the path (where.exe finds it and i can run autopep8.exe from the command prompt).
However, atom-beautify does not find it.
Only after changing the autopep8.coffee script to include the full path to autpep8 beautifier works.
The text was updated successfully, but these errors were encountered: