Python Error

How To Use User Defined Exception In Python

Python provide a lot of built-in exception classes. All the built-in classes are sub class of builtins.BaseException class. Besides built-in exception class, you can also create customize exception class. But all custom exception class must extend builtins.Exception class. The builtins.Exception class is also a sub class of builtins.BaseException class. This example will tell you how …

How To Use User Defined Exception In Python Read More »

How To Fix Python Error Certificate Verify Failed: Unable To Get Local Issuer Certificate In Mac OS

When i run python code in mac os, i meet a certificate verify failed error like this ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056). This error confused me a lot of time. And after google the error, i finally find the solution to fix it, below is the steps.

How To Fix Python Error Typeerror: ‘str’ Object Is Not Callable

When i develop python source code, i want to use python built-in function str() to conver a number variable to string type. But i meet below error Typeerror: ‘str’ Object Is Not Callable.  >>> x = 1.99 >>> >>> str(x) Traceback (most recent call last): File “<stdin>”, line 1, in <module> TypeError: ‘str’ object is …

How To Fix Python Error Typeerror: ‘str’ Object Is Not Callable Read More »