diff --git a/prody/proteins/wwpdb.py b/prody/proteins/wwpdb.py index d2c883f52..ef520c8dc 100644 --- a/prody/proteins/wwpdb.py +++ b/prody/proteins/wwpdb.py @@ -310,7 +310,7 @@ def fetchPDBviaHTTP(*pdb, **kwargs): continue try: url = getURL(pdb) - if kwargs['format'] != 'pdb': + if kwargs.get('format', 'pdb') != 'pdb': url = url.replace('.pdb', extension) handle = openURL(url) except Exception as err: