diff --git a/gas/scraping/google.py b/gas/scraping/google.py index 1e6a5e70..b89f657e 100644 --- a/gas/scraping/google.py +++ b/gas/scraping/google.py @@ -368,7 +368,7 @@ def _extract_full_size_urls_by_clicking(self, browser, limit): break if full_size_img: break - except: + except Exception: continue if full_size_img and full_size_img not in image_urls: @@ -385,7 +385,7 @@ def _extract_full_size_urls_by_clicking(self, browser, limit): time.sleep(random.uniform(0.2, 0.8)) close_button.click() time.sleep(random.uniform(0.3, 0.7)) - except: + except Exception: pass except Exception as e: diff --git a/gas/utils/chain_model_metadata_store.py b/gas/utils/chain_model_metadata_store.py index 37d63ab8..2e361bcb 100644 --- a/gas/utils/chain_model_metadata_store.py +++ b/gas/utils/chain_model_metadata_store.py @@ -67,7 +67,7 @@ async def retrieve_model_metadata( bt.logging.info(f"chain_str: {chain_str}") try: model_id = ModelId.from_compressed_str(chain_str) - except: + except Exception: bt.logging.trace( f"Failed to parse the metadata on the chain for hotkey {hotkey}." ) diff --git a/gas/utils/huggingface_uploads.py b/gas/utils/huggingface_uploads.py index ecaee1fa..939d1836 100644 --- a/gas/utils/huggingface_uploads.py +++ b/gas/utils/huggingface_uploads.py @@ -141,7 +141,7 @@ def upload_media_to_hf( try: create_repo(dataset_repo, repo_type="dataset", exist_ok=True, token=hf_token) - except: + except Exception: pass archive_operations = [] @@ -177,7 +177,7 @@ def upload_media_to_hf( for temp_file in all_temp_files: try: os.unlink(temp_file) - except: + except Exception: pass return successfully_processed_ids @@ -582,7 +582,7 @@ def create_image_archives( for temp_file in temp_files_to_cleanup: try: os.unlink(temp_file) - except: + except Exception: pass raise @@ -661,7 +661,7 @@ def create_video_archives( for temp_file in temp_files_to_cleanup: try: os.unlink(temp_file) - except: + except Exception: pass raise diff --git a/neurons/validator/services/generator_service.py b/neurons/validator/services/generator_service.py index 53d96a19..3d86228c 100644 --- a/neurons/validator/services/generator_service.py +++ b/neurons/validator/services/generator_service.py @@ -674,7 +674,7 @@ def _run_verification(self): try: from gas.verification import clear_clip_models clear_clip_models() - except: + except Exception: pass def _cleanup(self):