'ServerError' is not defined

I’m trying to handle the exception like this:
except ServerError as e:
if e.message[‘code’] == -1001:
print(’-1001 DISCONNECTED’)

but I get “name ‘ServerError’ is not defined”

Please tell me what is the problem. Thank you

I use SDK 1: To get the provided SDK for Binance Futures Connector

At line 108, your code has except ServerError as e written, but python can’t detect from where you’re getting the ServerError definition, hence the NameError error. This is a an error related with how your local code is written.