How to read StackTrace of Error

Check out this github issue. The work-around you are looking for is there.

import resource
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(resource.RLIMIT_NOFILE, (2048, rlimit[1]))