Skip to content

AccountClient does not work due to wrong self.base_url #2

@marcustut

Description

@marcustut
self = <edgex_sdk.account.client.Client object at 0x1090e6d50>, params = <edgex_sdk.account.client.GetAccountAssetSnapshotPageParams object at 0x1076867e0>

    async def get_account_asset_snapshot_page(self, params: GetAccountAssetSnapshotPageParams) -> Dict[str, Any]:
        """
        Get account asset snapshots with pagination.

        Args:
            params: Account asset snapshot query parameters

        Returns:
            Dict[str, Any]: The account asset snapshots

        Raises:
            ValueError: If the request fails
        """
>       url = f"{self.base_url}/api/v1/private/account/getAccountAssetSnapshotPage"
                 ^^^^^^^^^^^^^
E       AttributeError: 'Client' object has no attribute 'base_url'

../.venv/lib/python3.12/site-packages/edgex_sdk/account/client.py:308: AttributeError
============================================================================================ short test summary info =============================================================================================
FAILED tests/test_edgex.py::test_get_wallet_balance - AttributeError: 'Client' object has no attribute 'base_url'

This is because in edgex_sdk/account/client.py, self.async_client.base_url should be used instead of self.base_url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions