# Buggy code
def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024, **kwargs):
    """Return the content of a file for a commit.

    Args:
        ref (str): ID of the commit
        filepath (str): Path of the file to return
        streamed (bool): If True the data will be processed by chunks of
            `chunk_size` and each chunk is passed to `action` for
            treatment
        action (callable): Callable responsible of dealing with chunk of
            data
        chunk_size (int): Size of each chunk
        **kwargs: Extra options to send to the server (e.g. sudo)

    Raises:
        GitlabAuthenticationError: If authentication is not correct
        GitlabGetError: If the file could not be retrieved

    Returns:
        str: The file content
    """
    file_path = file_path.replace("/", "%2F").replace(".", "%2E")
    path = "%s/%s/raw" % (self.path, file_path)
    query_data = {"ref": ref}
    result = self.gitlab.http_get(
        path, query_data=query_data, streamed=streamed, **kwargs
    )
    return utils.response_content(result, streamed, action, chunk_size)


# Traceback (AttributeError)
(venv) ╭─user ~/Repositories/ExampleRepo  ‹feature/ci-ci-testing*›
╰─$ python gitlab_artifact.py                                      1 ↵
Traceback (most recent call last):
File "gitlab_artifact.py", line 60, in <module>
main()
File "gitlab_artifact.py", line 52, in main
a = most_recent_job.artifact("ExampleRepo/cached_service_specs.json")
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/cli.py", line 43, in wrapped_f
return f(*args, **kwargs)
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/exceptions.py", line 251, in wrapped_f
return f(*args, **kwargs)
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/v4/objects.py", line 1397, in artifact
return utils.response_content(result, streamed, action, chunk_size)
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/utils.py", line 28, in response_content
return response.content
AttributeError: 'list' object has no attribute 'content'

# Fixed code
def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024, **kwargs):
    """Return the content of a file for a commit.

    Args:
        ref (str): ID of the commit
        filepath (str): Path of the file to return
        streamed (bool): If True the data will be processed by chunks of
            `chunk_size` and each chunk is passed to `action` for
            treatment
        action (callable): Callable responsible of dealing with chunk of
            data
        chunk_size (int): Size of each chunk
        **kwargs: Extra options to send to the server (e.g. sudo)

    Raises:
        GitlabAuthenticationError: If authentication is not correct
        GitlabGetError: If the file could not be retrieved

    Returns:
        str: The file content
    """
    file_path = file_path.replace("/", "%2F").replace(".", "%2E")
    path = "%s/%s/raw" % (self.path, file_path)
    query_data = {"ref": ref}
    result = self.gitlab.http_get(
        path, query_data=query_data, streamed=streamed, raw=True, **kwargs
    )
    return utils.response_content(result, streamed, action, chunk_size)