MySQL Forums
Forum List  »  Connector/Python

beginner's fault? import mysql.connector errors
Posted by: Michael Gens
Date: February 01, 2017 05:05AM

Hello,

Running my python program I always get the following error lines:

$ ./dbHandlingConnect.py
Traceback (most recent call last):
File "./dbHandlingConnect.py", line 13, in <module>
import mysql.connector
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/__init__.py", line 37, in <module>
from .connection import MySQLConnection
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/connection.py", line 39, in <module>
from .conversion import MySQLConverter
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/conversion.py", line 27, in <module>
import datetime
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/datetime.py", line 8, in <module>
import math as _math
...

I have no clue what that means and what to do to prevent this behaviour.


In the meantime I reduced the code lines in my program dbHandlingConnect.py to:

#!/usr/local/bin/python3
# -*- coding: iso-8859-15 -*-

import mysql.connector
# import sys,os
#from mysql.connector import errorcode




But the error behaviour is still present.


I hope somebody can help.

Thank you very much in advance.

-------------------
OS: macOS, 10.12.3 (16D32)
installed dmg s
connector: mysql-connector-python-2.1.5-macos10.12.dmg
python: python-3.6.0-macosx10.6.dmg
mySQL: mysql-5.7.17-macos10.12-x86_64.dmg -->> not running yet

Options: ReplyQuote


Subject
Written By
Posted
beginner's fault? import mysql.connector errors
February 01, 2017 05:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.