merge-api / merge-sdk-python

The Python SDK for accessing various Merge Unified APIs
Other
0 stars 1 forks source link

No module named 'MergePythonSDK.hris.model.common_model_scopes_body_request' #30

Open ahmontero opened 1 year ago

ahmontero commented 1 year ago

This code

from MergePythonSDK.hris.model.end_user_details_request import EndUserDetailsRequest

 end_user_details_request = EndUserDetailsRequest(
    end_user_email_address=email,
    end_user_organization_name=company_name,
    end_user_origin_id=str(user_id),
    categories=["ats"],
)

Raises this exception:

ModuleNotFoundError: No module named 'MergePythonSDK.hris.model.common_model_scopes_body_request'

The problem seems to be in the method:

def lazy_import():
    from MergePythonSDK.shared.model.categories_enum import CategoriesEnum
    from MergePythonSDK.hris.model.common_model_scopes_body_request import CommonModelScopesBodyRequest # <- here
    globals()['CategoriesEnum'] = CategoriesEnum
    globals()['CommonModelScopesBodyRequest'] = CommonModelScopesBodyRequest

in MergePythonSDK/hris/model/end_user_details_request.py

The class CommonModelScopesBodyRequest exists in the library merge-hris-python, but it is not migrated in this library.