diff --git a/scenes/download.py b/scenes/download.py index 2800d0b008c1c7c83e8b7a42f69e2f6495e79ae7..afe5bba966ab5e572375409fa99053ce446d5230 100644 --- a/scenes/download.py +++ b/scenes/download.py @@ -9,7 +9,7 @@ import io import json from urllib.parse import urlencode import pycurl -import tqdm +from tqdm.autonotebook import tqdm def bbox2str(bbox): @@ -102,7 +102,7 @@ def curl_url(url, postdata, verbose=False, fp=None, header=None): if download_d > 0: nonlocal progress_bar, last_download_d if not progress_bar: - progress_bar = tqdm.tqdm(total=download_t, unit='iB', unit_scale=True) + progress_bar = tqdm(total=download_t, unit='iB', unit_scale=True) progress_bar.update(download_d - last_download_d) last_download_d = download_d diff --git a/scenes/spot.py b/scenes/spot.py index 609d56da00ded25fccc1338a63e17bdb2fc26f40..19a981c4bc09b860c3d5efc32792c03887196f79 100644 --- a/scenes/spot.py +++ b/scenes/spot.py @@ -3,7 +3,7 @@ This module contains Spot 6/7 classes. It implements sources, imagery and scene. """ import datetime import xml.etree.ElementTree as ET -import tqdm +from tqdm.autonotebook import tqdm import pyotb from scenes import utils from scenes.core import Source, Imagery, Scene @@ -41,7 +41,7 @@ def get_spot67_scenes(root_dir): # Create scenes list scenes = [] errors = {} - for dimap_file_xs in tqdm.tqdm(dimap_xs_files): + for dimap_file_xs in tqdm(dimap_xs_files): try: # Find pairs of XS/PAN DIMAPS pan_path = dimap_file_xs[:dimap_file_xs.find("/PROD_SPOT")]