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

Can not format when I use it in single file #127

Closed
1m188 opened this issue Jul 20, 2023 · 3 comments · Fixed by #128
Closed

Can not format when I use it in single file #127

1m188 opened this issue Jul 20, 2023 · 3 comments · Fixed by #128
Assignees

Comments

@1m188
Copy link

1m188 commented Jul 20, 2023

When I want to format my file when I do not open an activate workspace, (just open a single file), it doesn't work.
When I format a file with a opened workspace, (this file is not in this workspace) it also doesn't work.
It only work when I open a workspace and open a file which in actually in this workspace.
I hope it can work well in any situations.

@karthiknadig
Copy link
Member

@1m188 Can you share the logs from Output > autopep8? Make sure this is the case where it is not working.

@karthiknadig karthiknadig self-assigned this Jul 20, 2023
@1m188
Copy link
Author

1m188 commented Jul 22, 2023

emmm, when I format my file, it show notification like this:

Traceback (most recent call last):
File "c:\Users\user name.vscode\extensions\ms-python.autopep8-2023.6.0\bundled\tool\lsp_server.py", line 429, in _run_tool_on_document
result = utils.run_module(
File "c:\Users\user name.vscode\extensions\ms-python.autopep8-2023.6.0\bundled\tool\lsp_utils.py", line 153, in run_module
return _run_module(module, argv, use_stdin, source)
File "c:\Users\user name.vscode\extensions\ms-python.autopep8-2023.6.0\bundled\tool\lsp_utils.py", line 138, in _run_module
runpy.run_module(module, run_name="main")
File "c:\Users\user name\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 228, in run_module
return _run_code(code, {}, init_globals, run_name, mod_spec)
File "c:\Users\user name\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\Users\user name.vscode\extensions\ms-python.autopep8-2023.6.0\bundled\libs\autopep8.py", line 414, in
del pycodestyle._checks['logical_line'][pycodestyle.continued_indentation]
KeyError: <function continued_indentation at 0x000001A78FDC8820>

@karthiknadig
Copy link
Member

Can you share the initial part of the logs where settings are passed?

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