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

4 tests fail because of the missing file subtitle_with_attached_fonts_no_events.ass #75

Closed
yurivict opened this issue Jun 22, 2023 · 1 comment
Assignees
Labels

Comments

@yurivict
Copy link

Failures look like this:

______________________________________________________________________________________________ test_file_ending_with_font_section ______________________________________________________________________________________________

    def test_file_ending_with_font_section():
>       subs = SSAFile.load(FONT_SUBS_NO_EVENTS_PATH)

tests/test_attachment.py:34: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pysubs2.ssafile.SSAFile'>, path = '/usr/ports/multimedia/py-pysubs2/work-py39/pysubs2-1.6.1/tests/data/subtitle_with_attached_fonts_no_events.ass', encoding = 'utf-8', format_ = None, fps = None, kwargs = {}

    @classmethod
    def load(cls, path: str, encoding: str="utf-8", format_: Optional[str]=None, fps: Optional[float]=None, **kwargs) -> "SSAFile":
        """
        Load subtitle file from given path.
    
        This method is implemented in terms of :meth:`SSAFile.from_file()`.
    
        See also:
            Specific formats may implement additional loading options,
            please refer to documentation of the implementation classes
            (eg. :meth:`pysubs2.subrip.SubripFormat.from_file()`)
    
        Arguments:
            path (str): Path to subtitle file.
            encoding (str): Character encoding of input file.
                Defaults to UTF-8, you may need to change this.
            format_ (str): Optional, forces use of specific parser
                (eg. `"srt"`, `"ass"`). Otherwise, format is detected
                automatically from file contents. This argument should
                be rarely needed.
            fps (float): Framerate for frame-based formats (MicroDVD),
                for other formats this argument is ignored. Framerate might
                be detected from the file, in which case you don't need
                to specify it here (when given, this argument overrides
                autodetection).
            kwargs: Extra options for the reader.
    
        Returns:
            SSAFile
    
        Raises:
            IOError
            UnicodeDecodeError
            pysubs2.exceptions.UnknownFPSError
            pysubs2.exceptions.UnknownFormatIdentifierError
            pysubs2.exceptions.FormatAutodetectionError
    
        Note:
            pysubs2 may autodetect subtitle format and/or framerate. These
            values are set as :attr:`SSAFile.format` and :attr:`SSAFile.fps`
            attributes.
    
        Example:
            >>> subs1 = pysubs2.load("subrip-subtitles.srt")
            >>> subs2 = pysubs2.load("microdvd-subtitles.sub", fps=23.976)
            >>> subs3 = pysubs2.load("subrip-subtitles-with-fancy-tags.srt", keep_unknown_html_tags=True)
    
        """
>       with open(path, encoding=encoding) as fp:
E       FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/multimedia/py-pysubs2/work-py39/pysubs2-1.6.1/tests/data/subtitle_with_attached_fonts_no_events.ass'

Version: 1.6.1
Python-3.9
FreeBSD 13.2

@tkarabela tkarabela self-assigned this May 4, 2024
@tkarabela tkarabela added the bug label May 4, 2024
tkarabela added a commit that referenced this issue May 4, 2024
@tkarabela
Copy link
Owner

Fixed in version 1.7.0.

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

No branches or pull requests

2 participants