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

Indentation Error on trying PEP8Bear. #2972

Open
mbasil09 opened this issue Dec 9, 2019 · 1 comment
Open

Indentation Error on trying PEP8Bear. #2972

mbasil09 opened this issue Dec 9, 2019 · 1 comment

Comments

@mbasil09
Copy link

mbasil09 commented Dec 9, 2019

All other files in this directory worked fine, on trying PEP8Bear on this results.py, I get an error

C:\Users\mbasi\Desktop\open\intermine-ws-python-dev\build\lib\intermine>coala --files=results.py --bears=PEP8Bear --save --apply-patches -V
�[33m[WARNING]�[0m[00:04:34] 'cli' is an internally reserved section name. It may have been generated into your coafile while running coala with `--save`. The settings in that section will inherit implicitly to all sections as defaults just like CLI args do.Please change the name of that section in your coafile to avoid any unexpected behavior.�[0m
�[32m[DEBUG]�[0m[00:04:34] Platform Windows -- Python 3.7.4, coalib 0.11.0�[0m
�[32m[DEBUG]�[0m[00:04:34] Since the configuration settings have changed since the last run, the cache will be flushed and rebuilt.�[0m
�[32m[DEBUG]�[0m[00:04:34] The file cache was successfully flushed.�[0m
Executing section cli...
�[32m[DEBUG]�[0m[00:04:34] Files that will be checked:
c:\users\mbasi\desktop\open\intermine-ws-python-dev\build\lib\intermine\results.py�[0m
�[32m[DEBUG]�[0m[00:04:34] starting parse of 'c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe -m pip show autopep8'�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['-m'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['pip'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['show'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['autopep8'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] returning CommandNode(command=['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'] redirects={})�[0m
�[32m[DEBUG]�[0m[00:04:34] started: CommandNode(command=['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'] redirects={}), None, False�[0m
�[32m[DEBUG]�[0m[00:04:34] Command('c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe -m pip show autopep8') created�[0m
�[32m[DEBUG]�[0m[00:04:34] About to call Popen: ['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'], {'stdout': -1, 'stderr': -1, 'stdin': None}�[0m
�[32m[DEBUG]�[0m[00:04:34] Popen: Command('c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe -m pip show autopep8'), {'stdout': -1, 'stderr': -1, 'stdin': None} -> {'_waitpid_lock': <unlocked _thread.lock object at 0x04DD34D0>, '_input': None, '_communication_started': False, 'args': ['c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-m', 'pip', 'show', 'autopep8'], 'stdin': None, 'stdout': <_io.BufferedReader name=3>, 'stderr': <_io.BufferedReader name=4>, 'pid': 35900, 'returncode': None, 'encoding': None, 'errors': None, 'text_mode': None, '_sigint_wait_secs': 0.25, '_closed_child_pipe_fds': True, '_child_created': True, '_handle': Handle(896)}�[0m
�[32m[DEBUG]�[0m[00:04:34] Created thread Thread-1 as reader for Capture-1�[0m
�[32m[DEBUG]�[0m[00:04:34] Capture-1: reader thread about to read line�[0m
�[32m[DEBUG]�[0m[00:04:34] Capture-1: reader thread kicked off, waiting start�[0m
�[32m[DEBUG]�[0m[00:04:34] Capture-1: reader thread now started�[0m
�[32m[DEBUG]�[0m[00:04:34] Created thread Thread-2 as reader for Capture-2�[0m
�[32m[DEBUG]�[0m[00:04:34] Capture-2: reader thread about to read line�[0m
�[32m[DEBUG]�[0m[00:04:34] Capture-2: reader thread kicked off, waiting start�[0m
�[32m[DEBUG]�[0m[00:04:34] Capture-2: reader thread now started�[0m
�[32m[DEBUG]�[0m[00:04:34] about to wait for process�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 16 to <queue.Queue object at 0x04DD6970>: b'Name: autopep8\r\n'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 16 to <queue.Queue object at 0x04DD6970>: b'Version: 1.4.4\r\n'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 92 to <queue.Queue object at 0x04DD6970>: b'Summary: A tool that automatic'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 47 to <queue.Queue object at 0x04DD6970>: b'Home-page: https://github.com/'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 23 to <queue.Queue object at 0x04DD6970>: b'Author: Hideo Hattori\r\n'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 35 to <queue.Queue object at 0x04DD6970>: b'Author-email: hhatto.jp@gmail.'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 24 to <queue.Queue object at 0x04DD6970>: b'License: Expat License\r\n'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 86 to <queue.Queue object at 0x04DD6970>: b'Location: c:\\users\\mbasi\\appda'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 23 to <queue.Queue object at 0x04DD6970>: b'Requires: pycodestyle\r\n'�[0m
�[32m[DEBUG]�[0m[00:04:35] queued chunk of length 26 to <queue.Queue object at 0x04DD6970>: b'Required-by: coala-bears\r\n'�[0m
�[32m[DEBUG]�[0m[00:04:35] Capture-2: finished reading stream <_io.BufferedReader name=4>�[0m
�[32m[DEBUG]�[0m[00:04:35] Capture-1: finished reading stream <_io.BufferedReader name=3>�[0m
�[32m[DEBUG]�[0m[00:04:35] returning Command('c:\\users\\mbasi\\appdata\\local\\programs\\python\\python37-32\\python.exe -m pip show autopep8') (Popen(returncode=0 stdin=None stdout=<_io.BufferedReader name=3> stderr=<_io.BufferedReader name=4>))�[0m
�[32m[DEBUG]�[0m[00:04:35] pipeline closing�[0m
�[32m[DEBUG]�[0m[00:04:35] coala is run only on changed files, bears' log messages from previous runs may not appear. You may use the `--flush-cache` flag to see them.�[0m
�[32m[DEBUG]�[0m[00:04:39] Running bear PEP8Bear...�[0m
�[33m[WARNING]�[0m[00:04:39] Bear PEP8Bear failed to run on file c:\users\mbasi\desktop\open\intermine-ws-python-dev\build\lib\intermine\results.py. Take a look at debug messages (`-V`) for further information.�[0m
�[32m[DEBUG]�[0m[00:04:39] The bear PEP8Bear raised an exception. If you are the author of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the author of this bear.

Traceback information is provided below:

Traceback (most recent call last):
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\coalib\bears\Bear.py", line 282, in execute
    return [] if result is None else list(result)
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\bears\python\PEP8Bear.py", line 46, in run
    options=options).splitlines(True)
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 3359, in fix_code
    return fix_lines(sio.readlines(), options=options)
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 3434, in fix_lines
    fixed_source = fix.fix()
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 593, in fix
    aggressive=self.options.aggressive))
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 535, in _fix_source
    modified_lines = fix(result)
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 889, in fix_e402
    line_index)
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 1442, in get_module_imports_on_top_of_file
    if cnt == import_line_index or is_future_import(line):
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\site-packages\autopep8.py", line 1412, in is_future_import
    nodes = ast.parse(line)
  File "c:\users\mbasi\appdata\local\programs\python\python37-32\lib\ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 2
    import simplejson as json  # Prefer this as it is faster
    ^
IndentationError: unexpected indent�[0m
@abhishalya abhishalya transferred this issue from coala/coala May 13, 2020
@mitchell-frost
Copy link

I am new to coala. Can I work on this?

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

No branches or pull requests

2 participants