Segmentation fault (core dumped) python

Hi,
While running a python program on HPC I am getting " Segmentation fault (core dumped) python", but same program works fine in my local system (which has python 3.6).
what is the issue?

Python file: (this file is part of a project which has some other files also )

Error:

Looks like the script is simply setting a tuple at line 23, so it’s not obvious why Python dumped core. I find it curious that the core dump happened right after some checks for how the hook was compiled. Does the node where your job is running share the exact same instruction set as the node where you run the script manually. Is it possible the Python extension was compiled for an incompatible processor capability?

Try using “qsub -I” (interactive job) if you need to debug it further. Do you have a backtrace from gdb when you examine the core file?