diff --git a/compiler/error/source/400_BAD_REQUEST.tsv b/compiler/error/source/400_BAD_REQUEST.tsv index 953b96af..8537e43d 100644 --- a/compiler/error/source/400_BAD_REQUEST.tsv +++ b/compiler/error/source/400_BAD_REQUEST.tsv @@ -91,3 +91,4 @@ IMAGE_PROCESS_FAILED The server failed to process your image USERNAME_NOT_MODIFIED The username was not modified CALL_ALREADY_ACCEPTED The call is already accepted CALL_ALREADY_DECLINED The call is already declined +PHOTO_EXT_INVALID The photo extension is invalid \ No newline at end of file diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 5181b029..7f8ce2ef 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -1178,7 +1178,7 @@ class Client(Methods, BaseClient): try: module = import_module(module_path) - except ModuleNotFoundError: + except ImportError: log.warning('[LOAD] Ignoring non-existent module "{}"'.format(module_path)) continue @@ -1214,7 +1214,7 @@ class Client(Methods, BaseClient): try: module = import_module(module_path) - except ModuleNotFoundError: + except ImportError: log.warning('[UNLOAD] Ignoring non-existent module "{}"'.format(module_path)) continue