# Buggy code
def open(self):
    """Open the resource as "io.open" does

    Raises:
        FrictionlessException: any exception that occurs
    """
    self.close()

    # Infer
    self["name"] = self.name
    self["profile"] = self.profile
    self["scheme"] = self.scheme
    self["format"] = self.format
    self["hashing"] = self.hashing
    self["encoding"] = self.encoding
    if self.innerpath:
        self["innerpath"] = self.innerpath
    if self.compression:
        self["compression"] = self.compression
    if self.control:
        self["control"] = self.control
    if self.dialect:
        self["dialect"] = self.dialect
    self["stats"] = {"hash": "", "bytes": 0, "fields": 0, "rows": 0}

    # Validate
    if self.metadata_errors:
        error = self.metadata_errors[0]
        raise FrictionlessException(error)

    # Open
    try:
        # Table
        if self.tabular:
            self.__parser = system.create_parser(self)
            self.__parser.open()
            self.__read_detect_layout()
            self.__read_detect_schema()
            if not self.__nolookup:
                self.__lookup = self.__read_detect_lookup()
            self.__header = self.__read_header()
            self.__row_stream = self.__read_row_stream()
            return self

        # File
        else:
            self.__loader = system.create_loader(self)
            self.__loader.open()
            return self

    # Error
    except Exception:
        self.close()
        raise


# Traceback (frictionless.exception.FrictionlessException)
Traceback (most recent call last):
File "C:\Users\user\programs\PyCharm\PyCharm Community Edition 2020.3.2\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-packages\frictionless\describe\main.py", line 46, in describe
return describe(source, **options)
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-packages\frictionless\describe\resource.py", line 129, in describe_resource
with table as table:
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-packages\frictionless\table.py", line 217, in __enter__
self.open()
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-packages\frictionless\table.py", line 400, in open
self.__parser = system.create_parser(self.__resource)
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-packages\frictionless\system.py", line 161, in create_parser
raise FrictionlessException(errors.FormatError(note=note))
frictionless.exception.FrictionlessException: [format-error] The data source could not be successfully parsed: cannot create parser "pdf". Try installing "frictionless-pdf"

# Fixed code
def open(self):
    """Open the resource as "io.open" does

    Raises:
        FrictionlessException: any exception that occurs
    """
    self.close()

    # Infer
    self.pop("stats", None)
    self["name"] = self.name
    self["profile"] = self.profile
    self["scheme"] = self.scheme
    self["format"] = self.format
    self["hashing"] = self.hashing
    self["encoding"] = self.encoding
    if self.innerpath:
        self["innerpath"] = self.innerpath
    if self.compression:
        self["compression"] = self.compression
    if self.control:
        self["control"] = self.control
    if self.dialect:
        self["dialect"] = self.dialect
    self["stats"] = self.stats

    # Validate
    if self.metadata_errors:
        error = self.metadata_errors[0]
        raise FrictionlessException(error)

    # Open
    try:
        # Table
        if self.tabular:
            self.__parser = system.create_parser(self)
            self.__parser.open()
            self.__read_detect_layout()
            self.__read_detect_schema()
            if not self.__nolookup:
                self.__lookup = self.__read_detect_lookup()
            self.__header = self.__read_header()
            self.__row_stream = self.__read_row_stream()
            return self

        # File
        else:
            self.__loader = system.create_loader(self)
            self.__loader.open()
            return self

    # Error
    except Exception:
        self.close()
        raise