docusign-esign-python-client icon indicating copy to clipboard operation
docusign-esign-python-client copied to clipboard

Module 'Docusign_esign.models' has no attribute 'Date'

Open l3git9 opened this issue 2 years ago • 16 comments

Hi all, I'm attempting to use the get_document_tabs method and getting the error in the title. Any idea what could be the cause for this? I've tried a handful of other api calls and they all work fine. The following contains the stack

Traceback (most recent call last): File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\django\core\handlers\exception.py", line 47, in inner response = get_response(request) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\sentry_sdk\integrations\django\views.py", line 67, in sentry_wrapped_callback return callback(request, *args, **kwargs) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\django\views\generic\base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\rest_framework\views.py", line 509, in dispatch response = self.handle_exception(exc) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\rest_framework\views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception raise exc File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\rest_framework\views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\rest_framework\decorators.py", line 50, in handler return func(*args, **kwargs) File "C:\Users\l3GIT\Desktop\work\onboarding\app\realty_one_onboarding\views.py", line 533, in get_docusign_templates return JsonResponse(Template.get_user_docusign_templates([user.email for user in offices_owners]), safe=False) File "C:\Users\l3GIT\Desktop\work\onboarding\app\realty_one_onboarding\docusign\template.py", line 23, in get_user_docusign_templates cls.verify_fields_exist("test", "test") File "C:\Users\l3GIT\Desktop\work\onboarding\app\realty_one_onboarding\docusign\template.py", line 62, in verify_fields_exist tabs = template_api.get_document_tabs( File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\apis\templates_api.py", line 3020, in get_document_tabs (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\apis\templates_api.py", line 3099, in get_document_tabs_with_http_info return self.api_client.call_api(resource_path, 'GET', File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 350, in call_api return self.__call_api(resource_path, method, File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 184, in __call_api return_data = self.deserialize(r, response_type) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 264, in deserialize return self.__deserialize(data, response_type) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 307, in __deserialize return self.__deserialize_model(data, klass) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 661, in __deserialize_model setattr(instance, attr, self.__deserialize(value, attr_type)) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 281, in __deserialize return [self.__deserialize(sub_data, sub_kls) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 281, in <listcomp> return [self.__deserialize(sub_data, sub_kls) File "C:\Users\l3GIT\AppData\Local\pypoetry\Cache\virtualenvs\realtyone-onboarding-JbsbWoEO-py3.9\lib\site-packages\docusign_esign\client\api_client.py", line 296, in __deserialize klass = getattr(models, klass) AttributeError: module 'docusign_esign.models' has no attribute 'Date'

l3git9 avatar May 27 '22 23:05 l3git9

Follow up. Seemed to have figured out the issue, but this needs to be addressed. Unless this somehow went sideways on our end. In docusign_esign/models/init.py, it seems to be missing this import from docusign_esign.models.date import Date. Edit: Noticed there's also a pull request for this issue since August of 2021. Hopefully this is seen and finally looped in.

l3git9 avatar May 27 '22 23:05 l3git9

@l3git9 Thanks for letting us know about this. We created a ticket internally to resolve this.

jglassenberg avatar Jun 02 '22 22:06 jglassenberg

Yeah, I just ran into this one too. Any ETA on a fix? I've just fixed it locally now by editing the library but that's not a great solution.

tanabi avatar Jun 20 '22 22:06 tanabi

@tanabi Yeah I had to fork and create a temp package for now until this is resolved.

l3git9 avatar Jun 21 '22 04:06 l3git9

Hi everyone, my apologies for such a late reply. I had taken a short vacation and thought a colleague was watching this thread. That was my mistake.

We're still prioritizing a fix, and unfortunately, I don't have a time estimate just yet. I'm hoping to still resolve this by early next month but it's not definitive. However, I promise to follow up on this thread by end of week, at minimum, until the issue is resolved.

jglassenberg avatar Jul 21 '22 06:07 jglassenberg

End of week update - I can confirm that a fix has been identified and prioritized for early August to resolve. I'll continue to follow up here.

jglassenberg avatar Jul 23 '22 06:07 jglassenberg

Awesome! Glad to hear it.

tanabi avatar Jul 23 '22 20:07 tanabi

End of week update... we are still on track with the plan to fix this in the first half of August. Admittedly. I hadn't checked for a more specific update from Engineering before the end of the week, but the fix is part of the current sprint. I should have more details next week.

jglassenberg avatar Aug 07 '22 05:08 jglassenberg

Looking forward to it! :)

tanabi avatar Aug 07 '22 13:08 tanabi

It looks like we have a fix. Keep a lookout for the next release. Our next update should have this resolved.

jglassenberg avatar Aug 15 '22 23:08 jglassenberg

That release is delayed but should come along very soon

jglassenberg avatar Sep 03 '22 06:09 jglassenberg

Sorry for the slow reply, but there was an update released last week. Hopefully that resolves this issue, but please let me now if you downloaded the update and still encountered it.

jglassenberg avatar Sep 17 '22 07:09 jglassenberg

I'm facing the same issue when I'am trying to get envelope:

self._envelopes_api.get_envelope(account_id=self._account_id, envelope_id=envelope_id, include=["recipients,tabs"])

.......
File "/Users/keeper/Library/Caches/pypoetry/virtualenvs/doc-mgmt-gKn7XSOk-py3.10/lib/python3.10/site-packages/docusign_esign/client/api_client.py", line 307, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/Users/keeper/Library/Caches/pypoetry/virtualenvs/doc-mgmt-gKn7XSOk-py3.10/lib/python3.10/site-packages/docusign_esign/client/api_client.py", line 661, in __deserialize_model
    setattr(instance, attr, self.__deserialize(value, attr_type))
  File "/Users/keeper/Library/Caches/pypoetry/virtualenvs/doc-mgmt-gKn7XSOk-py3.10/lib/python3.10/site-packages/docusign_esign/client/api_client.py", line 281, in __deserialize
    return [self.__deserialize(sub_data, sub_kls)
  File "/Users/keeper/Library/Caches/pypoetry/virtualenvs/doc-mgmt-gKn7XSOk-py3.10/lib/python3.10/site-packages/docusign_esign/client/api_client.py", line 281, in <listcomp>
    return [self.__deserialize(sub_data, sub_kls)
  File "/Users/keeper/Library/Caches/pypoetry/virtualenvs/doc-mgmt-gKn7XSOk-py3.10/lib/python3.10/site-packages/docusign_esign/client/api_client.py", line 296, in __deserialize
    klass = getattr(models, klass)
AttributeError: module 'docusign_esign.models' has no attribute 'Date'

o-yanchenko avatar Apr 07 '23 19:04 o-yanchenko

@jglassenberg, hi!

There are 2 open pull request since September 2021...

https://github.com/docusign/docusign-esign-python-client/pull/122 https://github.com/docusign/docusign-esign-python-client/pull/121

Is it possible to merge one of them? I will be very grateful if you can look at them and merge (there is literally one line).

This bug does not allow me to fully work with the library, in case I need to get information about the envelope.

o-yanchenko avatar Apr 07 '23 19:04 o-yanchenko

I found what happened. I reviewed last lib versions and it looks like you fixed this issue, but this fix (import Date) has been deleted in 3.20.0 release https://github.com/docusign/docusign-esign-python-client/pull/163

https://github.com/docusign/docusign-esign-python-client/pull/163/files#diff-94083e6ed86a755c204e76d0bf1e32cd713c381506c891828b37501bf5741b11L492

So, one of PRs that I listed above can revert your fix back.

o-yanchenko avatar Apr 07 '23 19:04 o-yanchenko

I just ran into this issue again with 3.24.0

rbrady avatar Oct 16 '23 20:10 rbrady