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

pybabel 2.14.0 and newer reports "Unknown extraction method" error #17

Open
Poobslag opened this issue Jun 26, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@Poobslag
Copy link

The plugin reports an error running with pybabel 2.14.0 or newer:

extracting messages from project\assets\main\locale\localizables-extracted.py (encoding="utf-8")
extracting messages from project\assets\main\locale\localizables-scancodes.py (encoding="utf-8")
extracting messages from project\src\main\career\CareerMap.tscn (encoding="utf-8")
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Scripts\pybabel.exe\__main__.py", line 7, in <module>
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\frontend.py", line 979, in main
    return CommandLineInterface().run(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\frontend.py", line 905, in run
    return cmdinst.run()
           ^^^^^^^^^^^^^
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\frontend.py", line 516, in run
    for filename, lineno, message, comments, context in extracted:
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\extract.py", line 215, in extract_from_dir
    yield from check_and_call_extract_file(
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\extract.py", line 279, in check_and_call_extract_file
    for message_tuple in extract_from_file(
                         ^^^^^^^^^^^^^^^^^^
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\extract.py", line 321, in extract_from_file
    return list(extract(method, fileobj, keywords, comment_tags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\aaron\AppData\Local\Programs\Python\Python312\Lib\site-packages\babel\messages\extract.py", line 445, in extract
    raise ValueError(f"Unknown extraction method {method!r}")
ValueError: Unknown extraction method 'godot_scene'
. done.
. done.

Downgrading to pybabel 2.13.1 fixes the error.

@remram44 remram44 added the bug Something isn't working label Jun 26, 2024
@remram44
Copy link
Owner

Thanks for reporting!

python-babel/babel#1041 is the likely culprit. This might take a little time.

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

2 participants