raise InvalidDatabaseError when db_path is invalid database