gmo-media / mikasafabric

mikasafabric for MySQL is fork product of MySQL Fabric.
https://example.com/
GNU General Public License v2.0
3 stars 3 forks source link

`mikasafabric` can't run with Connector/Python 8.0 "ImportError: 'No module named fabric'" #10

Open yoku0825 opened 6 years ago

yoku0825 commented 6 years ago
# rpm -q mysql-connector-python
mysql-connector-python-8.0.12-1.el7.x86_64

# python -m pdb /usr/bin/mikasafabric
> /usr/bin/mikasafabric(19)<module>()
-> import os
(Pdb) n
> /usr/bin/mikasafabric(20)<module>()
-> import inspect
(Pdb) n
> /usr/bin/mikasafabric(21)<module>()
-> import sys
(Pdb) n
> /usr/bin/mikasafabric(22)<module>()
-> import textwrap
(Pdb) n
> /usr/bin/mikasafabric(23)<module>()
-> from getpass import getpass
(Pdb) n
> /usr/bin/mikasafabric(24)<module>()
-> from ConfigParser import NoOptionError
(Pdb) n
> /usr/bin/mikasafabric(25)<module>()
-> from urllib2 import HTTPError, URLError
(Pdb) n
> /usr/bin/mikasafabric(26)<module>()
-> import copy
(Pdb) n
> /usr/bin/mikasafabric(33)<module>()
-> from mysql.fabric import (
(Pdb) s
--Call--
> /usr/lib64/python2.7/site-packages/mysql/__init__.py(1)<module>()
(Pdb) n
> /usr/lib64/python2.7/site-packages/mysql/__init__.py(1)<module>()
(Pdb) n
--Return--
> /usr/lib64/python2.7/site-packages/mysql/__init__.py(1)<module>()->None
(Pdb) n
ImportError: 'No module named fabric'
> /usr/bin/mikasafabric(33)<module>()
-> from mysql.fabric import (
(Pdb) q

# ll /usr/lib64/python2.7/site-packages/mysql
total 12
-rw-r--r--. 1 root root    0 Jun 26 01:16 __init__.py
-rw-r--r--. 2 root root  139 Jun 26 01:21 __init__.pyc
-rw-r--r--. 2 root root  139 Jun 26 01:21 __init__.pyo
drwxr-xr-x. 4 root root 4096 Sep  6 07:32 connector

# ll /usr/lib/python2.7/site-packages/mysql/fabric -d
drwxr-xr-x. 5 root root 4096 Sep  6 08:01 /usr/lib/python2.7/site-packages/mysql/fabric
yoku0825 commented 6 years ago

Workaround: use Connector/Python 2.1.8