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.

Inconsistent progress bar between download and download_all

See original GitHub issue

In a notebook, I’ve observed that EODataAccessGateway.download_all was automatically selecting the right progress bar while wasn’t.

It’d be nice if could also select automatically the right progress bar. We could then completely remove all the from eodag.utils import NotebookProgressCallback;, progress_callback=NotebookProgressCallback()) from the notebooks 👍

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

sbrunatocommented, Apr 21, 2021

for this parameter, mixing all suggestions, we can use something like:

def download(self, progress_callback=ProgressCallback(), **other_params):
    if not progress_callback:
        progress_callback = ProgressCallback(disable=True)
    # [...]

class ProgressCallback(object):
    def __init__(self, max_size=None, disable=False):
        self.disable = disable
        # [...]

    def __call__(self, **params):
        # [...]
        if self.pb is None:
            self.pb = tqdm(
        # [...]

Not providing progress_callback will led to the creation of a default progress bar, but giving it False, None ot other False-evaluated value will create a disabled tqdm bar.

floriandeboissieucommented, Apr 21, 2021
* If `progress_callback=None` (by default), then eodag should guess which progress bar to use with `get_progress_callback()`. This seems to be the current logic, let's stick to that.

My 2cents on this parameter:

  • If progress_callback=None, no progress bar
  • If progress_callback="auto", guess progress bar
Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Multiple downloads and update progress bar for each
I created an interface and let the activity do the download instead of the fragment. I can do multiple downloads now but am...
Read more >
Downloading: Why do loading bars always get stuck on 99%?
In many system-related activities, such as file downloads, the system may hang the updating of the progress bar at 99% when a security...
Read more >
Onboarding - Inconsistent progress bar · Issue #1555 - GitHub
Loading of the progress bar will be consistent (same length) with each step. Actual Incosistency persists - as seen on video video: https:// ......
Read more >
Why are Progress Bars so Inconsistent? - Solidarity IT
Well, it's because progress bars work by measuring the number of individual tasks needed to complete an operation, and then comparing how many ......
Read more >
How to Download All Files from a SharePoint Site?
To download all files from a SharePoint document library or folder, Simply use the “Explorer View”. Navigate to your SharePoint On-premises or SharePoint...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found