--> -->
 
 
OperationalError
Python 3.6.9: /usr/bin/python3
Tue Apr 20 21:18:21 2021

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/html/index.py in <module>()
     38 
     39 # ------------------------------------------------------------------------------
=>   40 ConnectMySQL.ConnectToMySQL_NGDB(datetime, pymysql, DataVars)
     41 # ------------------------------------------------------------------------------
     42 ng_sql = "SELECT * FROM ng_rating where status = 'Approved'"
ConnectMySQL = <module 'ConnectMySQL' from '/var/www/html/ConnectMySQL.py'>, ConnectMySQL.ConnectToMySQL_NGDB = <function ConnectToMySQL_NGDB>, datetime = <module 'datetime' from '/usr/lib/python3.6/datetime.py'>, pymysql = <module 'pymysql' from '/usr/lib/python3/dist-packages/pymysql/__init__.py'>, DataVars = {'NexGen_AccountFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/accounts/', 'NexGen_AccountsInternal_Dir': '/mnt/ftp/nexgensurveying.com/db/accounts_internal/', 'NexGen_AgentBuyerFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/agents/buyer/', 'NexGen_AgentSellerFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/agents/seller/', 'NexGen_CompanyAccountsFile_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/', 'NexGen_CompanyListFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/list/', 'NexGen_OrdersFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/orders/list/', 'Server': '', 'Server_NexGen_AccountFiles_Dir': '/home/wp_2wkqpv/nexgensurveying.com/db/accounts/', 'Server_NexGen_AccountsInternal_Dir': '/home/wp_2wkqpv/nexgensurveying.com/db/accounts_internal/', ...}
 /var/www/html/ConnectMySQL.py in ConnectToMySQL_NGDB(datetime=<module 'datetime' from '/usr/lib/python3.6/datetime.py'>, pymysql=<module 'pymysql' from '/usr/lib/python3/dist-packages/pymysql/__init__.py'>, DataVars={'NexGen_AccountFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/accounts/', 'NexGen_AccountsInternal_Dir': '/mnt/ftp/nexgensurveying.com/db/accounts_internal/', 'NexGen_AgentBuyerFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/agents/buyer/', 'NexGen_AgentSellerFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/agents/seller/', 'NexGen_CompanyAccountsFile_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/', 'NexGen_CompanyListFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/companies/list/', 'NexGen_OrdersFiles_Dir': '/mnt/ftp/nexgensurveying.com/db/orders/list/', 'Server': '', 'Server_NexGen_AccountFiles_Dir': '/home/wp_2wkqpv/nexgensurveying.com/db/accounts/', 'Server_NexGen_AccountsInternal_Dir': '/home/wp_2wkqpv/nexgensurveying.com/db/accounts_internal/', ...})
     15                                             db=DataVars["ng_db"],
     16                                             charset='utf8',
=>   17                                             use_unicode=True
     18                                             )
     19     DataVars['ng_cursor'] = DataVars['ng_conn'].cursor( pymysql.cursors.DictCursor)
use_unicode undefined
 /usr/lib/python3/dist-packages/pymysql/__init__.py in Connect(*args=(), **kwargs={'charset': 'utf8', 'db': 'goldenanvil_db', 'host': '3.83.109.104', 'passwd': '!52N3GX3N?', 'port': 3306, 'use_unicode': True, 'user': 'goldenanvil'})
     88     """
     89     from .connections import Connection
=>   90     return Connection(*args, **kwargs)
     91 
     92 from . import connections as _orig_conn
Connection = <class 'pymysql.connections.Connection'>, args = (), kwargs = {'charset': 'utf8', 'db': 'goldenanvil_db', 'host': '3.83.109.104', 'passwd': '!52N3GX3N?', 'port': 3306, 'use_unicode': True, 'user': 'goldenanvil'}
 /usr/lib/python3/dist-packages/pymysql/connections.py in __init__(self=<pymysql.connections.Connection object>, host='3.83.109.104', user='goldenanvil', password='!52N3GX3N?', database='goldenanvil_db', port=3306, unix_socket=None, charset='utf8', sql_mode=None, read_default_file=None, conv={<class 'bool'>: <function escape_bool>, <class 'int'>: <function escape_int>, <class 'float'>: <function escape_float>, <class 'str'>: <function escape_unicode>, <class 'tuple'>: <function escape_sequence>, <class 'list'>: <function escape_sequence>, <class 'set'>: <function escape_sequence>, <class 'frozenset'>: <function escape_sequence>, <class 'dict'>: <function escape_dict>, <class 'NoneType'>: <function escape_None>, ...}, use_unicode=True, client_flag=2793997, cursorclass=<class 'pymysql.cursors.Cursor'>, init_command=None, connect_timeout=10, ssl=None, read_default_group=None, compress=None, named_pipe=None, no_delay=None, autocommit=False, db='goldenanvil_db', passwd='!52N3GX3N?', local_infile=False, max_allowed_packet=16777216, defer_connect=False, auth_plugin_map={}, read_timeout=None, write_timeout=None, bind_address=None, binary_prefix=False)
    697             self._sock = None
    698         else:
=>  699             self.connect()
    700 
    701     def _create_ssl_ctx(self, sslp):
self = <pymysql.connections.Connection object>, self.connect = <bound method Connection.connect of <pymysql.connections.Connection object>>
 /usr/lib/python3/dist-packages/pymysql/connections.py in connect(self=<pymysql.connections.Connection object>, sock=None)
    965                 exc.traceback = traceback.format_exc()
    966                 if DEBUG: print(exc.traceback)
=>  967                 raise exc
    968 
    969             # If e is neither DatabaseError or IOError, It's a bug.
exc = OperationalError(2003, "Can't connect to MySQL server on '3.83.109.104' (timed out)")

OperationalError: (2003, "Can't connect to MySQL server on '3.83.109.104' (timed out)")
      args = (2003, "Can't connect to MySQL server on '3.83.109.104' (timed out)")
      original_exception = timeout('timed out',)
      traceback = 'Traceback (most recent call last):\n File "/usr/...n\n sock.connect(sa)\nsocket.timeout: timed out\n'
      with_traceback = <built-in method with_traceback of OperationalError object>