Skip to content

Try to query for all past closed conversations results in "Exception: No type field found to faciliate deserialization" #242

Open
@garethbrickman

Description

@garethbrickman

Whilst running the below code line to query for all past convos, I run into this exception. The file throwing the Exception is typed_json_deserializer.py

It doesn't happen if I query for a specific user's past conversions, or conversion by ID.

for convo in intercom.conversations.find_all(open=False):

  File "/Users/garethbrickmansigma/GitHub/technical-support/intercom-chat-data-export-script/intercom_chat_data_export.py", line 56, in <module>
    main()
  File "/Users/garethbrickmansigma/GitHub/technical-support/intercom-chat-data-export-script/intercom_chat_data_export.py", line 27, in main
    for convo in intercom.conversations.find_all(open=False):
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/collection_proxy.py", line 57, in __next__
    instance = self.collection_cls(**resource)
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/traits/api_resource.py", line 47, in __init__
    _self.from_dict(params)
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/traits/api_resource.py", line 73, in from_dict
    setattr(self, attribute, value)
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/traits/api_resource.py", line 107, in __setattr__
    value_to_set = JsonDeserializer(value).deserialize()
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/lib/typed_json_deserializer.py", line 30, in deserialize
    if self._is_list_type:
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/lib/typed_json_deserializer.py", line 23, in _is_list_type
    return self._get_object_type.endswith('.list')
  File "/Users/garethbrickmansigma/.local/share/virtualenvs/intercom-chat-data-export-script-BWAwW81Z/lib/python3.9/site-packages/intercom/lib/typed_json_deserializer.py", line 17, in _get_object_type
    raise Exception(
Exception: No type field found to faciliate deserialization

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions