Skip to content

FileNotFoundError when running transcribe or translate command: missing info.json #37

Description

@marchfra

Description

When running bragir transcribe or bragir translate, the tool exits unexpectedly with a FileNotFoundError. The error reports that the file /usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/bragir/logging_configs/info.json cannot be found. This happens every time with different video and subtitle input files, and for multiple target languages. This is my first time using bragir and I installed it via Homebrew using the README instructions. The info.json file is missing from my installation directory (I'm not sure if it should have been created during installation or by the tool itself).

Full traceback:

Traceback (most recent call last):
  File "/usr/local/bin/bragir", line 7, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/click/core.py", line 1685, in invoke
    super().invoke(ctx)
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/bragir/__main__.py", line 23, in cli
    setup_logging(InfoLoggerStrategy())
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/bragir/tracing/logger.py", line 8, in setup_logging
    strategy.setup_logging()
  File "/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/bragir/tracing/stratergies.py", line 15, in setup_logging
    with resources.open_text("bragir.logging_configs", "info.json") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.12/3.12.12/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/resources/_legacy.py", line 44, in open_text
    return (_common.files(package) / normalize_path(resource)).open(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.12/3.12.12/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/bragir/logging_configs/info.json'

Steps to Reproduce

  1. Run bragir transcribe video.mp4
  2. Or run bragir translate subs.srt --language Lang (with any subtitle file and valid language)

Expected Behavior

  • For bragir transcribe video.mp4: An .srt file containing the generated subtitles for video.mp4 is created.
  • For bragir translate subs.srt --language Lang: A new .srt file with the subtitles translated to the specified language is created.
  • No errors or unexpected crashes.

Actual Behavior

The tool exits with a FileNotFoundError about the missing info.json every time, for different input files and languages. No output files are produced.

Environment

  • OS: Intel macOS Sequoia 15.6.1
  • Python: 3.12.12
  • bragir: 1.4.4 (installed with Homebrew)

Additional Information

  • info.json is missing from /usr/local/Cellar/bragir/1.4.4/libexec/lib/python3.12/site-packages/bragir/logging_configs/ after installation.
  • This occurred on a first-time install and use.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions