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.

InternalError when iterating list_by_factory() result which contains more than 50 results

See original GitHub issue
  • Package Name: azure-mgmt-datafactory
  • Package Version: 2.8.0
  • Operating System: macOS 11.7
  • Python Version: 3.8.10

Describe the bug When iterating the adf_client.linked_services.list_by_factory() result, if the result has more than 50 items, the first 50 items are being displayed, then an exception occurs.

To Reproduce Run

adf_linked_services = adf_client.linked_services.list_by_factory(rg_name, df_name)
for adf_linked_service in adf_linked_services:
    print(adf_linked_service.name)

for a resource group/data factory which has more than 50 linked services. Result: the first 50 linked service names are being displayed, then the following error occurs: HttpResponseError: (InternalError) Internal error has occurred.

Expected behavior All linked services are being displayed, without error.

Additional context For a resource group/data factory which has less than 50 linked services, the function works properly.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ralucachintoanucommented, Oct 24, 2022

I’m not sure. I mean, yes I’ve used this api before, actually the same code used to work before and at some point just stopped working. But I’m not sure if when it used to work, we had more than 50 linked services (because with <= 50 linked services it works even now) and at some point we just created more linked services and this is the reason it stopped working.

I’ve just tested the new version released 2 hours ago (2.9.0) and it works without problem, it lists all 63 linked services I have. With versions 2.8.0. and 2.8.1 it still fails. I’ll just upgrade and use the new version.

Thanks for looking into this!

1reaction
ralucachintoanucommented, Sep 26, 2022

Forgot to mention: in my case, it prints the first 50 results, then it appears to get stuck, but if I wait enough I get the error in the end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An exception occurred while iterating over the results of a ...
The problem was that .Contais() is too slow receiving a large numbers of items and was causing this strange behavior. To fix it...
Read more >
An exception occurred in the database while iterating ... - GitHub
I have a table MyData with 3 columns of interest. ... An exception occurred in the database while iterating the results of a...
Read more >
7. Iteration — How to Think Like a Computer Scientist
Repeated execution of a set of statements is called iteration. Because iteration is so common, Python provides several language features to make it...
Read more >
4. Algorithms and Flow Control - High Performance JavaScript ...
Since each iteration through the loop results in a property lookup either on the instance or on a prototype, the for-in loop has...
Read more >
Iterators and generators - JavaScript - MDN Web Docs
In JavaScript an iterator is an object which defines a sequence and potentially a return value upon its termination.
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