Skip to content
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

ValueError: invalid literal for int() with base 10: 'auto' #515

Closed
trevorphillipscoding opened this issue Jan 9, 2020 · 7 comments
Closed
Assignees
Labels

Comments

@trevorphillipscoding
Copy link


Python Code

Traceback (most recent call last):
  File "/Users/trevorphillips/.local/share/virtualenvs/taxbot-web-l9QEaBVw/bin/autopep8", line 8, in <module>
    sys.exit(main())
  File "/Users/trevorphillips/.local/share/virtualenvs/taxbot-web-l9QEaBVw/lib/python3.7/site-packages/autopep8.py", line 4176, in main
    args = parse_args(argv[1:], apply_config=apply_config)
  File "/Users/trevorphillips/.local/share/virtualenvs/taxbot-web-l9QEaBVw/lib/python3.7/site-packages/autopep8.py", line 3650, in parse_args
    parser = read_config(args, parser)
  File "/Users/trevorphillips/.local/share/virtualenvs/taxbot-web-l9QEaBVw/lib/python3.7/site-packages/autopep8.py", line 3761, in read_config
    value = config.getint(section, k)
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 818, in getint
    fallback=fallback, **kwargs)
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 808, in _get_conv
    **kwargs)
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 802, in _get
    return conv(self.get(section, option, **kwargs))
ValueError: invalid literal for int() with base 10: 'auto'

Command Line

$ autopep8 -i -r .

Your Environment

  • Python version: Python 3.7.6
  • autopep8 version: autopep8 1.4.4 (pycodestyle: 2.5.0)
  • Platform: macOSX
@MingleiLI
Copy link

I have the same problem.

Python version: Python 3.7.6
autopep8 version: autopep8 1.4.4 (pycodestyle: 2.5.0)
Platform: Ubuntu

@hhatto
Copy link
Owner

hhatto commented Jan 16, 2020

Thanks for reporting.

Could you tell me what the configuration file looks like?
and, Could you share the execution log of autopep8 with -vvv option.

@trevorphillips @MingleiLI

@trevorphillipscoding
Copy link
Author

trevorphillipscoding commented Jan 16, 2020

@hhatto I did a reinstall of my modules. (I deleted my pipenv files and just did a reinstall from my requirements.txt) and everything works as expected now.

I do have a configuration file that looks like this.
[pep8]
exclude = .git,__pycache__,*/migrations/*,node_modules/*

@hhatto hhatto self-assigned this Mar 3, 2020
@imdeepmind
Copy link

Any update on this issue? I'm facing this same issue.

@hhatto
Copy link
Owner

hhatto commented Nov 15, 2020

@imdeepmind
What is the version of autopep8? 1.4.4? 1.5.4 latest?

And, Can you indicate which repositories are experiencing specific problems?

@hhatto
Copy link
Owner

hhatto commented Dec 26, 2020

No reply, so I'll close it once.
If the problem still occurs, I will reopen it.

@hhatto
Copy link
Owner

hhatto commented Oct 28, 2022

@trevorphillipscoding @MingleiLI @imdeepmind
This problem has been fixed in version 1.7.1.
Please try the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants