morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.84k stars 221 forks source link

1.4.4-beta.27 is turning SRT files into blanks after syncing #2598

Closed alfuraiji closed 1 day ago

alfuraiji commented 2 months ago

Describe the bug Bazarr is turning SRT files into blanks ( deletes everything inside the file ) after syncing - ASS files sync normally. ( happens with Arabic subtitles not sure about other languages )

To Reproduce Steps to reproduce the behavior: Just sync any subtitle with an SRT file

Software

morpheus65535 commented 2 months ago

I haven't specifically tested with beta.27 but I can't reproduce with beta.30.

  1. Downloaded an Arabic subtitles
  2. Manually synced the Arabic subtitles with an external English subtitles as reference
  3. Waited for sync to ends
  4. The synced subtitles file contains a valid subtitles

Maybe provide a debug log if you're able to reproduce?

alfuraiji commented 2 months ago

Tested with 1.4.4-beta.30 it works fine! tested with multiple SRTs

Sorry couldn't post the log because I cleared it and forgot which SRT got blanked will keep testing manually before I enable the auto-sync.

Thanks

alfuraiji commented 1 day ago

Hi It happened again .. Arabic SRT files still get cleared and become blank with auto sync enabled.

those all are zero bytes now.

Screenshot 2024-10-26 at 3 08 04 PM

here is the log

bazarr (2).log.zip

I'm on v1.4.6-beta.12

morpheus65535 commented 1 day ago

@alfuraiji it's a totally new issue:

BAZARR Error (cannot access local variable 'anidb_id' where it is not associated with a value) trying to get video information for this file: /data/anime/Detective Conan/Season 32/Detective Conan - S32E12 - The Lost Treasure Mystery - 2024-04-13 - HDTV-1080p v2 - Erai-raws.mkv|Traceback (most recent call last):
  File "/app/bin/bazarr/subtitles/utils.py", line 48, in get_video
    refiner(path, video)
  File "/app/bin/bazarr/subtitles/refiners/anidb.py", line 206, in refine_from_anidb
    refine_anidb_ids(video)
  File "/app/bin/bazarr/subtitles/refiners/anidb.py", line 214, in refine_anidb_ids
    anidb_series_id, anidb_episode_no, anidb_season_episode_offset = anidb_client.get_show_information(
                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bin/bazarr/../libs/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)     
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bin/bazarr/../libs/dogpile/cache/region.py", line 1632, in get_or_create_for_user_func
    return self.get_or_create(      
           ^^^^^^^^^^^^^^^^^^^
  File "/app/bin/bazarr/../libs/dogpile/cache/region.py", line 1092, in get_or_create
    with Lock(
  File "/app/bin/bazarr/../libs/dogpile/lock.py", line 185, in __enter__
    return self._enter()        
           ^^^^^^^^^^^^^
  File "/app/bin/bazarr/../libs/dogpile/lock.py", line 94, in _enter
    generated = self._enter_create(value, createdtime)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bin/bazarr/../libs/dogpile/lock.py", line 178, in _enter_create
    return self.creator()       
           ^^^^^^^^^^^^^^
  File "/app/bin/bazarr/../libs/dogpile/cache/region.py", line 1046, in gen_value
    created_value = creator(
                    ^^^^^^^^
  File "/app/bin/bazarr/subtitles/refiners/anidb.py", line 134, in get_show_information
    return anidb_id, episode - offset, offset       
           ^^^^^^^^
UnboundLocalError: cannot access local variable 'anidb_id' where it is not associated with a value

@anderson-oki any idea?

anderson-oki commented 1 day ago

@morpheus65535 It is fixed here 😸 https://github.com/morpheus65535/bazarr/pull/2736

I guess v1.4.6-beta.13

morpheus65535 commented 1 day ago

Ok thanks! So it will be fixed in upcoming beta.

alfuraiji commented 13 minutes ago

Great! Thanks