You have to define which type of exception you want to catch. So write except Exception, e: instead of except, e: for a general exception (that will be ... ... <看更多>
Catching Exceptions: try and except ¶. The main tool Python gives you for handling runtime exceptions is the try ... except clause. Its basic structure is this ... ... <看更多>