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

[BUG] api.py "sequences: bytes" SyntaxError #157

Closed
nergalex opened this issue Jan 2, 2022 · 2 comments
Closed

[BUG] api.py "sequences: bytes" SyntaxError #157

nergalex opened this issue Jan 2, 2022 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nergalex
Copy link

nergalex commented Jan 2, 2022

Describe the bug
Error raised during module import:

  File \"/opt/custom-envs/cloudbuilder-k8s-py3/lib/python3.9/site-packages/requests/__init__.py\", line 48, in <module>
    from charset_normalizer import __version__ as charset_normalizer_version
  File \"/opt/custom-envs/cloudbuilder-k8s-py3/lib/python3.9/site-packages/charset_normalizer/__init__.py\", line 24, in <module>
    from .api import from_bytes, from_fp, from_path, normalize
  File \"/opt/custom-envs/cloudbuilder-k8s-py3/lib/python3.9/site-packages/charset_normalizer/api.py\", line 36
    sequences: bytes,
             ^
SyntaxError: invalid syntax

To Reproduce

  • install Python 3.9.9
  • use ansible collection kubernetes.core version 2.2.2
  • run a task using kubernetes.core.k8s

Logs
log.txt

Desktop (please complete the following information):

  • OS: Red Hat Enterprise Linux Server release 7.9 (Maipo)
  • Python version: Python 3.9.9
  • Package version: 2.0.9
@nergalex nergalex added bug Something isn't working help wanted Extra attention is needed labels Jan 2, 2022
@Ousret
Copy link
Member

Ousret commented Jan 3, 2022

Similarly to #114 I highly doubt that your Python setup is in a good shape.
The SyntaxError on sequences: bytes means that your Python Core does not support type hint on function arguments.

@Ousret Ousret closed this as completed Jan 3, 2022
@nergalex
Copy link
Author

nergalex commented Jan 3, 2022

Thank you. Correct, error was python2 used instead of python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Development

No branches or pull requests

2 participants