zcrmsdk.CLException.ZCRMException: <exception str() failed> when trying to get fields on Contacts

zcrmsdk.CLException.ZCRMException: <exception str() failed> when trying to get fields on Contacts

Hello,

I can’t figure out why this code does not work. The first five lines work fine and the print dir of the contacts_instance prints the last call but it fails on the last call.

Code:

crmsdk.ZCRMRestClient.initialize(configuration_dictionary)

contacts_instance = crmsdk.ZCRMModule.get_instance('Contacts')
print(dir(contacts_instance))
contacts = contacts_instance.get_records().response_json["data"]

print(len(contacts))

contact_fields = contacts_instance.get_all_fields()

Result:

/Users/ddow/venv37/bin/python /Users/ddow/dev/simple_pix/zoho_tests.py
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'add_tags_to_multiple_records', 'api_name', 'business_card_field_limit', 'business_card_fields', 'create_records', 'create_tags', 'default_custom_view', 'default_custom_view_id', 'default_territory_id', 'default_territory_name', 'delete_records', 'display_field_id', 'display_field_name', 'fields', 'get_all_customviews', 'get_all_deleted_records', 'get_all_fields', 'get_all_layouts', 'get_all_relatedlists', 'get_customview', 'get_field', 'get_instance', 'get_layout', 'get_permanently_deleted_records', 'get_record', 'get_records', 'get_recyclebin_records', 'get_relatedlist', 'get_tag_count', 'get_tags', 'id', 'is_api_supported', 'is_convertable', 'is_creatable', 'is_custom_module', 'is_deletable', 'is_editable', 'is_global_search_supported', 'is_scoring_supported', 'is_viewable', 'layouts', 'mass_update_records', 'modified_by', 'modified_time', 'module_name', 'per_page', 'plural_label', 'profiles', 'properties', 'related_list_properties', 'related_lists', 'remove_tags_from_multiple_records', 'search_layout_fields', 'search_records', 'search_records_by_criteria', 'search_records_by_email', 'search_records_by_phone', 'sequence_number', 'singular_label', 'update_customview', 'update_module_settings', 'update_records', 'update_tags', 'upsert_records', 'web_link’]

20

Traceback (most recent call last):
  File "/Users/ddow/dev/simple_pix/zoho_tests.py", line 19, in <module>
    contact_fields = contacts_instance.get_all_fields()
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Operations.py", line 142, in get_all_fields
    return ModuleAPIHandler.get_instance(self).get_all_fields()
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Handler.py", line 1308, in get_all_fields
    raise ex
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Handler.py", line 1300, in get_all_fields
    bulk_api_response=APIRequest(handler_ins).get_bulk_api_response()
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Request.py", line 67, in get_bulk_api_response
    raise ex
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Request.py", line 65, in get_bulk_api_response
    return BulkAPIResponse(response,response.status_code,self.url,self.request_api_key,self.request_method)
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Response.py", line 111, in __init__
    super(BulkAPIResponse,self).__init__(response,status_code,url,apiKey)
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Response.py", line 30, in __init__
    self.process_response()
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Response.py", line 37, in process_response
    self.handle_faulty_responses()
  File "/Users/ddow/venv37/lib/python3.7/site-packages/zcrmsdk/Response.py", line 125, in handle_faulty_responses
    raise exception
zcrmsdk.CLException.ZCRMException: <exception str() failed>

Process finished with exit code 1

    Access your files securely from anywhere









                          Zoho Developer Community




                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources

                                                                                            Zoho Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方