Actually I am using Ubuntu 16.04 and python3 so in that when I am importing MySQL.connector and CGI in a single file the file is not working showing the error
#!/usr/bin/python3
import cgi
import mysql.connector as msql
Segmentation fault (core dumped).
These both are not working simultaneously but working individually.
I don´t know why but in my case changing the order on imports solved the problem
With this imports:
import sys, pdfplumber, json, io, re, getpass
import mysql.connector as mariadb
I get Segmentation fault (core dumped)
I changed the imports order letting mysql.connector first
import mysql.connector as mariadb
import sys, pdfplumber, json, io, re, getpass
And my script ran flawlessly
It took me whole day to solve it.... hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With