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

[Issue]: Logging error for Japanese characters #82

Open
1 task done
oat82997 opened this issue Feb 16, 2025 · 2 comments
Open
1 task done

[Issue]: Logging error for Japanese characters #82

oat82997 opened this issue Feb 16, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@oat82997
Copy link

Confirmations

  • I have checked the issues tab, and couldn't find an existing open issue for the issue I want to report.

OS Type

MacOS

Python Version

3.13.2

Package Version

2.6.2

Description

https://tv.apple.com/jp/movie/%E3%83%95%E3%83%AC%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B7/umc.cmc.xafhh76eamlmtgprndbgiq71

Attempting to rip the link above gives "No matching subtitles were found."

Could this possibly be due to the type of subtitles - Japanese, always on?
日本語(日本) (常にオン)

Side note: I used pipx in the output log but I've also tried using pip3 and I get the same errors.

Output Log

--- Logging error ---
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 1150, in emit
    msg = self.format(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 998, in format
    return fmt.format(record)
           ~~~~~~~~~~^^^^^^^^
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/logger.py", line 76, in format
    return logging.Formatter(fmt=LOG_FILE_METADATA + message, datefmt=r"%Y-%m-%d %H:%M:%S").format(record)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 714, in format
    s = self.formatMessage(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 683, in formatMessage
    return self._style.format(record)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 472, in format
    return self._format(record)
           ~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 468, in _format
    return self._fmt % values
           ~~~~~~~~~~^~~~~~~~
TypeError: not enough arguments for format string
Call stack:
  File "/Users/xxxx/.local/bin/isubrip", line 8, in <module>
    sys.exit(main())
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 48, in main
    _main()
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 93, in _main
    logger.debug(f"CLI Command: {PACKAGE_NAME} {cli_args}")
Message: 'CLI Command: isubrip https://tv.apple.com/jp/movie/%E3%83%95%E3%83%AC%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B7/umc.cmc.xafhh76eamlmtgprndbgiq71'
Arguments: ()
Scraping https://tv.apple.com/jp/movie/%E3%83%95%E3%83%AC%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B7/umc.cmc.xafhh76eamlmtgprndbgiq71
--- Logging error ---
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 1150, in emit
    msg = self.format(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 998, in format
    return fmt.format(record)
           ~~~~~~~~~~^^^^^^^^
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/logger.py", line 76, in format
    return logging.Formatter(fmt=LOG_FILE_METADATA + message, datefmt=r"%Y-%m-%d %H:%M:%S").format(record)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 714, in format
    s = self.formatMessage(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 683, in formatMessage
    return self._style.format(record)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 472, in format
    return self._format(record)
           ~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 468, in _format
    return self._fmt % values
           ~~~~~~~~~~^~~~~~~~
TypeError: not enough arguments for format string
Call stack:
  File "/Users/xxxx/.local/bin/isubrip", line 8, in <module>
    sys.exit(main())
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 48, in main
    _main()
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 103, in _main
    EVENT_LOOP.run_until_complete(download(
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 2040, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/commands/download.py", line 53, in download
    logger.info(f"Scraping [blue]{url}[/blue]")
Message: 'Scraping [blue]https://tv.apple.com/jp/movie/%E3%83%95%E3%83%AC%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B7/umc.cmc.xafhh76eamlmtgprndbgiq71[/blue]'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 1150, in emit
    msg = self.format(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 998, in format
    return fmt.format(record)
           ~~~~~~~~~~^^^^^^^^
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/logger.py", line 76, in format
    return logging.Formatter(fmt=LOG_FILE_METADATA + message, datefmt=r"%Y-%m-%d %H:%M:%S").format(record)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 714, in format
    s = self.formatMessage(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 683, in formatMessage
    return self._style.format(record)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 472, in format
    return self._format(record)
           ~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 468, in _format
    return self._fmt % values
           ~~~~~~~~~~^~~~~~~~
TypeError: not enough arguments for format string
Call stack:
  File "/Users/xxxx/.local/bin/isubrip", line 8, in <module>
    sys.exit(main())
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 48, in main
    _main()
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 103, in _main
    EVENT_LOOP.run_until_complete(download(
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 2040, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/commands/download.py", line 55, in download
    scraper = ScraperFactory.get_scraper_instance(url=url)
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/scrapers/scraper.py", line 779, in get_scraper_instance
    logger.debug(f"Searching for a scraper object that matches URL '{url}'...")
Message: "Searching for a scraper object that matches URL 'https://tv.apple.com/jp/movie/%E3%83%95%E3%83%AC%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B7/umc.cmc.xafhh76eamlmtgprndbgiq71'..."
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 1150, in emit
    msg = self.format(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 998, in format
    return fmt.format(record)
           ~~~~~~~~~~^^^^^^^^
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/logger.py", line 76, in format
    return logging.Formatter(fmt=LOG_FILE_METADATA + message, datefmt=r"%Y-%m-%d %H:%M:%S").format(record)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 714, in format
    s = self.formatMessage(record)
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 683, in formatMessage
    return self._style.format(record)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 472, in format
    return self._format(record)
           ~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/logging/__init__.py", line 468, in _format
    return self._fmt % values
           ~~~~~~~~~~^~~~~~~~
TypeError: not enough arguments for format string
Call stack:
  File "/Users/xxxx/.local/bin/isubrip", line 8, in <module>
    sys.exit(main())
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 48, in main
    _main()
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/__main__.py", line 103, in _main
    EVENT_LOOP.run_until_complete(download(
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 2040, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/xxxx/.local/pipx/venvs/isubrip/lib/python3.13/site-packages/isubrip/commands/download.py", line 58, in download
    logger.debug(f"Fetching {url}")
Message: 'Fetching https://tv.apple.com/jp/movie/%E3%83%95%E3%83%AC%E3%82%B9%E3%83%86%E3%83%BC%E3%82%B7/umc.cmc.xafhh76eamlmtgprndbgiq71'
Arguments: ()
Found movie: The Prestige [2007] (ID: 544393415)
No matching subtitles were found.

Config

[downloads]
# languages = ["ja", "ja-JP"]
languages = []
@oat82997 oat82997 added the bug Something isn't working label Feb 16, 2025
@MichaelYochpaz
Copy link
Owner

Hey @oat82997, thanks for reporting.
The error you're seeing is just a logging error, it seems that there's an issue logging Japanese characters (which are in the URL). I'll look into it.

But the functionality of iSubRip is unaffected. The reason you're not getting any subtitles is that there are only the Japanese subtitles, which are "always on".

This is similar to CC subtitles on #16. These subtitles are embedded within the video file (unlike other subtitles that are separate files) and iSubRip cannot download them.

@oat82997
Copy link
Author

Ah, I didn't think about them being embedded. My bad. I'll leave the issue open for the logging error though.

@oat82997 oat82997 changed the title [Issue]: Possible missing subtitle type [Issue]: Logging error for Japanese characters Feb 17, 2025
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