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

EOFError: Ran out of input when running in pre-commit CI #435

Open
3 tasks done
IceBotYT opened this issue Aug 18, 2024 · 0 comments
Open
3 tasks done

EOFError: Ran out of input when running in pre-commit CI #435

IceBotYT opened this issue Aug 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@IceBotYT
Copy link

IceBotYT commented Aug 18, 2024

Checklist

Description

When running sourcery in pre-commit inside GitHub Actions, it fails with this error. See here for full Actions run.

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/__main__.py", line 12, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/binary/command_line_interface/__init__.py", line 44, in <module binary.command_line_interface>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/binary/hub_server.py", line 11, in <module binary.hub_server>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/hub/app.py", line 32, in <module hub.app>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/sourcery/rules/proposers.py", line 6, in <module sourcery.rules.proposers>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/sourcery/rules/private/comments/dsl/avoid_builtin_shadow.py", line 3, in <module sourcery.rules.private.comments.dsl.avoid_builtin_shadow>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/sourcery/dsl/proposals.py", line 15, in <module sourcery.dsl.proposals>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/sourcery/code/source_unparser.py", line 18, in <module sourcery.code.source_unparser>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf/__init__.py", line 41, in <module yapf>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf/yapflib/yapf_api.py", line [38](https://github.com/IceBotYT/nice-go/actions/runs/10441430046/job/28912548602?pr=18#step:4:39), in <module yapf.yapflib.yapf_api>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf/pyparser/pyparser.py", line 44, in <module yapf.pyparser.pyparser>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf/yapflib/format_token.py", line 23, in <module yapf.yapflib.format_token>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 11[47](https://github.com/IceBotYT/nice-go/actions/runs/10441430046/job/28912548602?pr=18#step:4:48), in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf/pytree/pytree_utils.py", line 30, in <module yapf.pytree.pytree_utils>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf_third_party/_ylib2to3/pygram.py", line 29, in <module yapf_third_party._ylib2to3.pygram>
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf_third_party/_ylib2to3/pgen2/driver.py", line 2[52](https://github.com/IceBotYT/nice-go/actions/runs/10441430046/job/28912548602?pr=18#step:4:53), in load_grammar
  File "/home/runner/.cache/pre-commit/repoon734gmg/py_env-python3.12/lib/python3.12/site-packages/sourcery/yapf_third_party/_ylib2to3/pgen2/grammar.py", line 95, in load
EOFError: Ran out of input

Re-running it solves the problem

Code snippet that reproduces issue

Debug Information

IDE Version:

N/A

Sourcery Version:

Sourcery 1.21.0

Operating system and Version:

Runs on GitHub Actions ubuntu-latest

@IceBotYT IceBotYT added the bug Something isn't working label Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant