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

python -m tokenize is broken when reading from stdin #105324

Closed
pablogsal opened this issue Jun 5, 2023 · 0 comments
Closed

python -m tokenize is broken when reading from stdin #105324

pablogsal opened this issue Jun 5, 2023 · 0 comments

Comments

@pablogsal
Copy link
Member

pablogsal commented Jun 5, 2023

 ./python.exe -m tokenize <<< 'f"{F():\n}"'
unexpected error: 'generator' object is not callable
Traceback (most recent call last):
  File "/Users/pgalindo3/github/python/main/Lib/runpy.py", line 198, in _run_module_as_main
    return _run_code(code, main_globals, None,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgalindo3/github/python/main/Lib/runpy.py", line 88, in _run_code
    exec(code, run_globals)
  File "/Users/pgalindo3/github/python/main/Lib/tokenize.py", line 532, in <module>
    main()
  File "/Users/pgalindo3/github/python/main/Lib/tokenize.py", line 498, in main
    for token in tokens:
  File "/Users/pgalindo3/github/python/main/Lib/tokenize.py", line 527, in _generate_tokens_from_c_tokenizer
    for info in it:
TypeError: 'generator' object is not callable

Linked PRs

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

No branches or pull requests

1 participant