UnboundLocalError: local variable 'MySQLdb' referenced before assignmentREQUEST_DATE: 2022-06-28 10:26:07 PAN_VERSION: 7.9.2 OS_VERSION: Ubuntu 22.04 LTS aarch64(Py3.7.8) REMOTE_ADDR: 152.70.101.75 REQUEST_URI: POST /site?action=AddSiteREQUEST_FORM: {'webname_1': 'www.wangzhe2002.xyz:88', 'ps': 'www.wangzhe2002.xyz', 'path': '/www/wwwroot/www.wangzhe2002.xyz', 'datauser': 'www_wangzhe2002', 'datapassword': '8iHaBKZaew', 'version': '80', 'port': '88', 'webname': '{"domain":"www.wangzhe2002.xyz:88","domainlist":[],"count":1}', 'ftp': 'false', 'sql': 'true', 'address': 'localhost', 'codeing': 'utf8'} USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36Traceback (most recent call last): File "class/panelMysql.py", line 26, in __Conn socket_re = re.search(r"socket\s*=\s*(.+)",myconf) File "/www/server/panel/pyenv/lib/python3.7/re.py", line 185, in search return _compile(pattern, flags).search(string)TypeError: expected string or bytes-like objectDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/www/server/panel/BTPanel/__init__.py", line 1753, in publicObject return run_exec().run(toObject, defs, get) File "/www/server/panel/BTPanel/__init__.py", line 1701, in run result = getattr(toObject,get.action)(get) File "class/panelSite.py", line 640, in AddSite result = database.database().AddDatabase(get) File "class/database.py", line 305, in AddDatabase if self.database_exists_for_mysql(mysql_obj,data_name): return public.returnMsg(False,'指定数据库已在MySQL中存在,请换个名称!') File "class/database.py", line 335, in database_exists_for_mysql databases_tmp = self.map_to_list(mysql_obj.query('show databases')) File "class/panelMysql.py", line 116, in query if not self.__Conn(): return self.__DB_ERR File "class/panelMysql.py", line 66, in __Conn except MySQLdb.Error as e:UnboundLocalError: local variable 'MySQLdb' referenced before assignment
|
|