title: pyodbc segfault on pyodbc.connect
body: <p>bit of a noob here. im trying to create a python script to stress test SQL based databases.</p>
  
  <p>ive been trying to use pyodbc to connect to the database however i ran into a segmentation fault error upon pyodbc.connect(connectionString)</p>
  
  <pre><code>#connects to the database
  def connectToDb():
  print(labels.OKBLUE + "Connecting to: " + args.ip + " at port: " + args.port)
  
  connString = ""
  connString = connString + ';DRIVER=' + args.driver
  connString = connString +';SERVER=' + args.ip
  if not args.port == "":
      connString = connString + ';PORT=' + args.port
  connString = connString + ';UID=' + args.user
  connString = connString + ';PWD=' + args.password
  connString = connString + ';Encrypt=yes;Connection Timeout=30'
  if not args.database == None or not args.database == "":
      connString = connString + ";Database=" + args.database
  try:
      print(connString) #for debugging
      conn = pyodbc.connect(connString)
  except pyodbc.Error as ex:
      for arg in ex.args:
          print(labels.FAIL + arg )
      sys.exit()
  </code></pre>
  
  <p>which returns this:</p>
  
  <pre><code>;DRIVER={FreeTDS};SERVER=127.0.0.1;PORT=3306;UID=root;PWD=********;Encrypt=yes;Connection Timeout=30;Database=test
  
  Segmentation fault
  </code></pre>
  
  <p>im just trying to connect to a local mysql server, and i dont know what is causing this, any help and advice is greatly appreciated</p>
  
  <p>EDIT:</p>
  
  <p>debian jessie as operating system</p>
  
  <p>python 3 latest</p>
  
  <p>odbc latest</p>
  
  <p>freetds v0.91</p>
  
  <p>TDS version 4.2</p>
  
  <p>-- Jort </p>