backtrackbaba / cowin

Python wrapper for CoWin API's
MIT License
42 stars 18 forks source link

module 'cowin_api.models' has no attribute 'IO' #12

Closed Kartik-Singhal26 closed 3 years ago

Kartik-Singhal26 commented 3 years ago

While running the following script in Jupyter Environment

from cowin_api import CoWinAPI

Error Message: 

AttributeError                            Traceback (most recent call last)
<ipython-input-6-6c470a7ea45e> in <module>
----> 1 from cowin_api import CoWinAPI

~\anaconda3\lib\site-packages\cowin_api\__init__.py in <module>
      4 
      5 from cowin_api import models
----> 6 from cowin_api.api_client import ApiClient, AsyncApis, SyncApis  # noqa F401
      7 
      8 for model in inspect.getmembers(models, inspect.isclass):

~\anaconda3\lib\site-packages\cowin_api\api_client.py in <module>
     14     SyncBeneficiaryRegistrationAPIsApi,
     15 )
---> 16 from cowin_api.api.certificate_ap_is_api import AsyncCertificateAPIsApi, SyncCertificateAPIsApi
     17 from cowin_api.api.metadata_ap_is_api import AsyncMetadataAPIsApi, SyncMetadataAPIsApi
     18 from cowin_api.api.user_authentication_ap_is_api import AsyncUserAuthenticationAPIsApi, SyncUserAuthenticationAPIsApi

~\anaconda3\lib\site-packages\cowin_api\api\certificate_ap_is_api.py in <module>
     10 
     11 
---> 12 class _CertificateAPIsApi:
     13     def __init__(self, api_client: "ApiClient"):
     14         self.api_client = api_client

~\anaconda3\lib\site-packages\cowin_api\api\certificate_ap_is_api.py in _CertificateAPIsApi()
     14         self.api_client = api_client
     15 
---> 16     def _build_for_download(self, beneficiary_reference_id: str) -> Awaitable[m.IO]:
     17         """
     18         API to download vaccination certificate in PDF format by beneficiary reference id.

AttributeError: module 'cowin_api.models' has no attribute 'IO'
DragonWarrior15 commented 3 years ago

@Kartik-Singhal26 I don't think the code is from this repository, please verify before continuing this thread.

backtrackbaba commented 3 years ago

@Kartik-Singhal26 The library you are referring to is not open sourced. You can check for the author via Pypi and try to get it resolved.

Here's a link to the project on Pypi - https://pypi.org/project/cowin-api/

Hope this helps!

Kartik-Singhal26 commented 3 years ago

Hi, thanks for pointing out, I accidently commented on the wrong repo. Please close this.