question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Backup Usage Summaries of VaultRecoveryServicesBackup gives End of Paging error

See original GitHub issue
  • Package Name: azure-mgmt-recoveryservicesbackup:
  • Package Version: 0.8.0:
  • Operating System: windows10:
  • Python Version: 3.8:

Describe the bug I have created a RecoveryServicesBackupClient. I am then using iterator_object = backup_usage_summaries.list(resource_group_name, vault_name) method to create an iterator object. On Using next(iterator_object) to iterate through it, it gives me an End of Paging error.

I also tried iterating using a for loop and tried printing the items. The execution stops after execution of for loop without any error.

Any azure developer can help resolve this bug? To Reproduce Steps to reproduce the behavior:

credentials = ServicePrincipalCredentials(tenant, client_id, client_secret)
subscription_client = SubscriptionClient(credentials=credentials)
subscriptions_list = subscription_client.subscriptions.list()
iterable = next(subscriptions_list)
subscription_id = iterable.subscription_id
recovery_backup_client = RecoveryServicesBackupClient(credentials=credentials, subscription_id=subscription_id)
iteraton_1 = recovery_backup_client.backup_usage_summaries.list(resource_group_name, vault_name)
next(iteration_1)
End of Paging

Expected behavior next(iteration_1) should give an iterable and can be printed

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
akshayneemacommented, Apr 23, 2021

Hey @shreyasmoolya09! The backup_usage_summaries API requires a filter string to be passed for it to return the correct output. If the filter string is not provided it returns an empty list. In your case, it is returning an empty list, therefore on doing next(iteration_1) it gives StopIteration: End of paging error which means that it has already reached the end of the iterator object as the list was empty.

To solve this issue please try passing the appropriate filter string also. For example -

  • Use recovery_backup_client.backup_usage_summaries.list(resource_group_name, vault_name, “type eq ‘BackupProtectedItemCountSummary’”) to get Protected Item Count Summary for that vault.

  • Use recovery_backup_client.backup_usage_summaries.list(resource_group_name, vault_name, “type eq ‘BackupProtectionContainerCountSummary’”) to get Protection Container Count Summary for that vault.

Thanks.

1reaction
pvrkcommented, Jul 16, 2020

@pratimaupadhyay02: Can you please take a look?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Paging file and disk errors on Windows 10 Enterprise for ...
I have 2 different Azure WVD servers. Currently, every time a user logs in, they receive a warning "Windows created a temporary paging...
Read more >
Managing Usage Processing Errors - Salesforce Help
If Salesforce Billing encounters an error when trying to associate usage with a usage summary, it sets the usage's status to Error or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found