Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
garethbrickman opened this issue Jan 30, 2023 · 0 comments

Comments

@garethbrickman
Copy link

garethbrickman commented Jan 30, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant