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

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

Open
l3git9 opened this issue May 27, 2022 · 16 comments
Open

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

l3git9 opened this issue May 27, 2022 · 16 comments

Comments

@l3git9
Copy link

l3git9 commented May 27, 2022

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
Copy link
Author

l3git9 commented May 27, 2022

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.

@jglassenberg
Copy link

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

@tanabi
Copy link

tanabi commented Jun 20, 2022

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.

@l3git9
Copy link
Author

l3git9 commented Jun 21, 2022

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

@jglassenberg
Copy link

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
Copy link

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.

@tanabi
Copy link

tanabi commented Jul 23, 2022

Awesome! Glad to hear it.

@jglassenberg
Copy link

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.

@tanabi
Copy link

tanabi commented Aug 7, 2022

Looking forward to it! :)

@jglassenberg
Copy link

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

@jglassenberg
Copy link

That release is delayed but should come along very soon

@jglassenberg
Copy link

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.

@o-yanchenko
Copy link

o-yanchenko commented Apr 7, 2023

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
Copy link

o-yanchenko commented Apr 7, 2023

@jglassenberg, hi!

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

#122
#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
Copy link

o-yanchenko commented Apr 7, 2023

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 #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.

@rbrady
Copy link

rbrady commented Oct 16, 2023

I just ran into this issue again with 3.24.0

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

5 participants