# Buggy code
def update_info(self, data, params=None, headers=None, **kwargs):
    """Update information about this object.

    Send a PUT to the object's base endpoint to modify the provided
    attributes.

    :param data:
        The updated information about this object.
        Must be JSON serializable.
        Update the object attributes in data.keys(). The semantics of the
        values depends on the the type and attributes of the object being
        updated. For details on particular semantics, refer to the Box
        developer API documentation <https://developer.box.com/>.
    :type data:
        `dict`
    :param params:
        (optional) Query string parameters for the request.
    :type params:
        `dict` or None
    :param headers:
        (optional) Extra HTTP headers for the request.
    :type headers:
        `dict` or None
    :param kwargs:
        Optional arguments that ``put`` takes.
    :return:
        The updated object.
        Return a new object of the same type, without modifying the
        original object passed as self.
        Construct the new object with all the default attributes that are
        returned from the endpoint.
    :rtype:
        :class:`BaseObject`
    """
    url = self.get_url()
    box_response = self._session.put(
        url, data=json.dumps(data), params=params, headers=headers, **kwargs
    )
    return self.translator.translate(
        session=self._session,
        response_object=box_response.json(),
    )


# Traceback (boxsdk.exception.BoxAPIException)
Adding collab
Updated collab
Traceback (most recent call last):
File "./box_reorg_test.py", line 43, in <module>
main()
File "./box_reorg_test.py", line 33, in main
_ = src_collab.update_info(CollaborationRole.OWNER)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/util/api_call_decorator.py", line 71, in call
return method(*args, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/object/collaboration.py", line 61, in update_info
return super(Collaboration, self).update_info(data=data)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/util/api_call_decorator.py", line 71, in call
return method(*args, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/object/base_object.py", line 127, in update_info
box_response = self._session.put(url, data=json.dumps(data), params=params, headers=headers, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 121, in put
return self.request('PUT', url, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 157, in request
response = self._prepare_and_send_request(method, url, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 400, in _prepare_and_send_request
self._raise_on_unsuccessful_request(network_response, request)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 332, in _raise_on_unsuccessful_request
network_response=network_response,
boxsdk.exception.BoxAPIException: Message: Non-json response received, while expecting json response.
Status: 204
Code: None
Request ID: None
Headers: {'Date': 'Mon, 27 Jul 2020 23:16:54 GMT', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'BOX-REQUEST-ID': '065305bafe80ff3870567b8c931b5d5aa'}
URL: https://api.box.com/2.0/collaborations/27688108163
Method: PUT
Context Info: None

# Fixed code
def update_info(self, data, params=None, headers=None, **kwargs):
    """Update information about this object.

    Send a PUT to the object's base endpoint to modify the provided
    attributes.

    :param data:
        The updated information about this object.
        Must be JSON serializable.
        Update the object attributes in data.keys(). The semantics of the
        values depends on the the type and attributes of the object being
        updated. For details on particular semantics, refer to the Box
        developer API documentation <https://developer.box.com/>.
    :type data:
        `dict`
    :param params:
        (optional) Query string parameters for the request.
    :type params:
        `dict` or None
    :param headers:
        (optional) Extra HTTP headers for the request.
    :type headers:
        `dict` or None
    :param kwargs:
        Optional arguments that ``put`` takes.
    :return:
        The updated object.
        Return a new object of the same type, without modifying the
        original object passed as self.
        Construct the new object with all the default attributes that are
        returned from the endpoint.
    :rtype:
        :class:`BaseObject`
    """
    # pylint:disable=no-else-return
    url = self.get_url()
    box_response = self._session.put(
        url, data=json.dumps(data), params=params, headers=headers, **kwargs
    )
    if "expect_json_response" in kwargs and not kwargs["expect_json_response"]:
        return box_response.ok
    else:
        return self.translator.translate(
            session=self._session,
            response_object=box_response.json(),
        )