nar-prod.frappe15.africlouds.dev Open in urlscan Pro
195.15.201.250  Public Scan

URL: https://nar-prod.frappe15.africlouds.dev/
Submission: On November 15 via api from US — Scanned from CH

Form analysis 1 forms found in the DOM

<form>
  <p>PIN: <input type="text" name="pin" size="14">
    <input type="submit" name="btn" value="Confirm Pin">
  </p>
</form>

Text Content

OPERATIONALERROR

pymysql.err.OperationalError: (1045, "Access denied for user
'_5138a6940bc28cb7'@'10.1.202.92' (using password: YES)")


TRACEBACK (MOST RECENT CALL LAST)

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/APP.PY", LINE 95, IN
   APPLICATION
   
           response = None
   
    
   
           try:
   
                   rollback = True
   
    
   
                   init_request(request)
   
    
   
                   validate_auth()
   
    
   
                   if request.method == "OPTIONS":
   
                           response = Response()

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/APP.PY", LINE 191, IN
   INIT_REQUEST
   
           else:
   
                   request.max_content_length = cint(frappe.local.conf.get("max_file_size")) or 25 * 1024 * 1024
   
           make_form_dict(request)
   
    
   
           if request.method != "OPTIONS":
   
                   frappe.local.http_request = HTTPRequest()
   
    
   
           for before_request_task in frappe.get_hooks("before_request"):
   
                   frappe.call(before_request_task)
   
    
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/AUTH.PY", LINE 40, IN __INIT__
   
    
   
                   # load cookies
   
                   self.set_cookies()
   
    
   
                   # login and start/resume user session
   
                   self.set_session()
   
    
   
                   # set request language
   
                   self.set_lang()
   
    
   
                   # match csrf token from current session

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/AUTH.PY", LINE 76, IN
   SET_SESSION
   
    
   
           def set_cookies(self):
   
                   frappe.local.cookie_manager = CookieManager()
   
    
   
           def set_session(self):
   
                   frappe.local.login_manager = LoginManager()
   
    
   
           def validate_csrf_token(self):
   
                   if (
   
                           not frappe.request
   
                           or frappe.request.method not in UNSAFE_HTTP_METHODS

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/AUTH.PY", LINE 121, IN __INIT__
   
                           # run login triggers
   
                           self.run_trigger("on_session_creation")
   
                   else:
   
                           try:
   
                                   self.resume = True
   
                                   self.make_session(resume=True)
   
                                   self.get_user_info()
   
                                   self.set_user_info(resume=True)
   
                           except AttributeError:
   
                                   self.user = "Guest"
   
                                   self.get_user_info()

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/AUTH.PY", LINE 209, IN
   MAKE_SESSION
   
           def clear_preferred_language(self):
   
                   frappe.local.cookie_manager.delete_cookie("preferred_language")
   
    
   
           def make_session(self, resume=False):
   
                   # start session
   
                   frappe.local.session_obj = Session(
   
                           user=self.user, resume=resume, full_name=self.full_name, user_type=self.user_type
   
                   )
   
    
   
                   # reset user if changed to Guest
   
                   self.user = frappe.local.session_obj.user

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/SESSIONS.PY", LINE 214, IN
   __INIT__
   
    
   
                   # set local session
   
                   frappe.local.session = self.data
   
    
   
                   if resume:
   
                           self.resume()
   
    
   
                   else:
   
                           if self.user:
   
                                   self.start()
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/SESSIONS.PY", LINE 285, IN
   RESUME
   
                   data = self.get_session_record()
   
    
   
                   if data:
   
                           self.data.update({"data": data, "user": data.user, "sid": self.sid})
   
                           self.user = data.user
   
                           validate_ip_address(self.user)
   
                   else:
   
                           self.start_as_guest()
   
    
   
                   if self.sid != "Guest":
   
                           frappe.local.user_lang = frappe.translate.get_user_lang(self.data.user)

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/AUTH.PY", LINE 420, IN
   VALIDATE_IP_ADDRESS
   
           from frappe.core.doctype.user.user import get_restricted_ip_list
   
    
   
           # Only fetch required fields - for perf
   
           user_fields = ["restrict_ip", "bypass_restrict_ip_check_if_2fa_enabled"]
   
           user_info = (
   
                   frappe.get_cached_value("User", user, user_fields, as_dict=True)
   
                   if not frappe.flags.in_test
   
                   else frappe.db.get_value("User", user, user_fields, as_dict=True)
   
           )
   
           ip_list = get_restricted_ip_list(user_info)
   
           if not ip_list:

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/__INIT__.PY", LINE 1196, IN
   GET_CACHED_VALUE
   
    
   
   def get_cached_value(
   
           doctype: str, name: str, fieldname: str = "name", as_dict: bool = False
   
   ) -> Any:
   
           try:
   
                   doc = get_cached_doc(doctype, name)
   
           except DoesNotExistError:
   
                   clear_last_message()
   
                   return
   
    
   
           if isinstance(fieldname, str):

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/__INIT__.PY", LINE 1137, IN
   GET_CACHED_DOC
   
   def get_cached_doc(*args, **kwargs) -> "Document":
   
           if (key := can_cache_doc(args)) and (doc := cache.get_value(key)):
   
                   return doc
   
    
   
           # Not found in cache, fetch from DB
   
           doc = get_doc(*args, **kwargs)
   
    
   
           # Store in cache
   
           if not key:
   
                   key = get_document_cache_key(doc.doctype, doc.name)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/__INIT__.PY", LINE 1265, IN
   GET_DOC
   
                   todo = frappe.get_doc("ToDo", "TD0001")
   
    
   
           """
   
           import frappe.model.document
   
    
   
           doc = frappe.model.document.get_doc(*args, **kwargs)
   
    
   
           # Replace cache if stale one exists
   
           if not kwargs.get("for_update") and (key := can_cache_doc(args)) and cache.exists(key):
   
                   _set_document_in_cache(key, doc)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MODEL/DOCUMENT.PY", LINE 80, IN
   GET_DOC
   
                   if "doctype" in kwargs:
   
                           doctype = kwargs["doctype"]
   
                   else:
   
                           raise ValueError('"doctype" is a required key')
   
    
   
           controller = get_controller(doctype)
   
           if controller:
   
                   return controller(*args, **kwargs)
   
    
   
           raise ImportError(doctype)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MODEL/BASE_DOCUMENT.PY", LINE
   65, IN GET_CONTROLLER
   
    
   
           :param doctype: DocType name as string.
   
           """
   
    
   
           if frappe.local.dev_server or frappe.flags.in_migrate:
   
                   return import_controller(doctype)
   
    
   
           site_controllers = frappe.controllers.setdefault(frappe.local.site, {})
   
           if doctype not in site_controllers:
   
                   site_controllers[doctype] = import_controller(doctype)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MODEL/BASE_DOCUMENT.PY", LINE
   80, IN IMPORT_CONTROLLER
   
           from frappe.model.document import Document
   
           from frappe.utils.nestedset import NestedSet
   
    
   
           module_name = "Core"
   
           if doctype not in DOCTYPES_FOR_DOCTYPE:
   
                   doctype_info = frappe.db.get_value("DocType", doctype, fieldname="*")
   
                   if doctype_info:
   
                           if doctype_info.custom:
   
                                   return NestedSet if doctype_info.is_tree else Document
   
                           module_name = doctype_info.module
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   516, IN GET_VALUE
   
    
   
                           # returns default date_format
   
                           frappe.db.get_value("System Settings", None, "date_format")
   
                   """
   
    
   
                   result = self.get_values(
   
                           doctype,
   
                           filters,
   
                           fieldname,
   
                           ignore,
   
                           as_dict,

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   617, IN GET_VALUES
   
    
   
                           if (filters is not None) and (filters != doctype or doctype == "DocType"):
   
                                   try:
   
                                           if order_by:
   
                                                   order_by = "modified" if order_by == DefaultOrderBy else order_by
   
                                           out = self._get_values_from_table(
   
                                                   fields=fields,
   
                                                   filters=filters,
   
                                                   doctype=doctype,
   
                                                   as_dict=as_dict,
   
                                                   debug=debug,

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   884, IN _GET_VALUES_FROM_TABLE
   
                           validate_filters=True,
   
                   )
   
                   if isinstance(fields, str) and fields == "*":
   
                           as_dict = True
   
    
   
                   return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
   
    
   
           def _get_value_for_many_names(
   
                   self,
   
                   doctype,
   
                   names,

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/QUERY_BUILDER/UTILS.PY", LINE
   87, IN EXECUTE_QUERY
   
           """
   
    
   
           def execute_query(query, *args, **kwargs):
   
                   child_queries = query._child_queries if isinstance(query._child_queries, list) else []
   
                   query, params = prepare_query(query)
   
                   result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
   
                   execute_child_queries(child_queries, result)
   
                   return result
   
    
   
           def execute_child_queries(queries, result):
   
                   if not queries or not result or not isinstance(result[0], dict) or not result[0].name:

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   212, IN SQL
   
    
   
                   # replaces ifnull in query with coalesce
   
                   query = IFNULL_PATTERN.sub("coalesce(", query)
   
    
   
                   if not self._conn:
   
                           self.connect()
   
    
   
                   # in transaction validations
   
                   self.check_transaction_status(query)
   
                   self.clear_db_table_cache(query)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   118, IN CONNECT
   
                   pass
   
    
   
           def connect(self):
   
                   """Connects to a database as set in `site_config.json`."""
   
                   self.cur_db_name = self.user
   
                   self._conn: Union["MariadbConnection", "PostgresConnection"] = self.get_connection()
   
                   self._cursor: Union["MariadbCursor", "PostgresCursor"] = self._conn.cursor()
   
    
   
                   try:
   
                           if execution_timeout := get_query_execution_timeout():
   
                                   self.set_execution_timeout(execution_timeout)

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/MARIADB/DATABASE.PY",
   LINE 103, IN GET_CONNECTION
   
                   )
   
    
   
    
   
   class MariaDBConnectionUtil:
   
           def get_connection(self):
   
                   conn = self._get_connection()
   
                   conn.auto_reconnect = True
   
                   return conn
   
    
   
           def _get_connection(self):
   
                   """Return MariaDB connection object."""

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/MARIADB/DATABASE.PY",
   LINE 109, IN _GET_CONNECTION
   
                   conn.auto_reconnect = True
   
                   return conn
   
    
   
           def _get_connection(self):
   
                   """Return MariaDB connection object."""
   
                   return self.create_connection()
   
    
   
           def create_connection(self):
   
                   return pymysql.connect(**self.get_connection_settings())
   
    
   
           def set_execution_timeout(self, seconds: int):

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/MARIADB/DATABASE.PY",
   LINE 112, IN CREATE_CONNECTION
   
           def _get_connection(self):
   
                   """Return MariaDB connection object."""
   
                   return self.create_connection()
   
    
   
           def create_connection(self):
   
                   return pymysql.connect(**self.get_connection_settings())
   
    
   
           def set_execution_timeout(self, seconds: int):
   
                   self.sql("set session max_statement_time = %s", int(seconds))
   
    
   
           def get_connection_settings(self) -> dict:

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 358, IN __INIT__
   
               self._connect_attrs["program_name"] = program_name
   
    
   
           if defer_connect:
   
               self._sock = None
   
           else:
   
               self.connect()
   
    
   
       def __enter__(self):
   
           return self
   
    
   
       def __exit__(self, *exc_info):

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 664, IN CONNECT
   
               self._sock = sock
   
               self._rfile = sock.makefile("rb")
   
               self._next_seq_id = 0
   
    
   
               self._get_server_information()
   
               self._request_authentication()
   
    
   
               # Send "SET NAMES" query on init for:
   
               # - Ensure charaset (and collation) is set to the server.
   
               #   - collation_id in handshake packet may be ignored.
   
               # - If collation is not specified, we don't know what is server's

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 954, IN _REQUEST_AUTHENTICATION
   
                   v = v.encode("utf-8")
   
                   connect_attrs += _lenenc_int(len(v)) + v
   
               data += _lenenc_int(len(connect_attrs)) + connect_attrs
   
    
   
           self.write_packet(data)
   
           auth_packet = self._read_packet()
   
    
   
           # if authentication method isn't accepted the first byte
   
           # will have the octet 254
   
           if auth_packet.is_auth_switch_request():
   
               if DEBUG:

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 772, IN _READ_PACKET
   
    
   
           packet = packet_type(bytes(buff), self.encoding)
   
           if packet.is_error_packet():
   
               if self._result is not None and self._result.unbuffered_active is True:
   
                   self._result.unbuffered_active = False
   
               packet.raise_for_error()
   
           return packet
   
    
   
       def _read_bytes(self, num_bytes):
   
           self._sock.settimeout(self._read_timeout)
   
           while True:

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/PROTOCOL.PY",
   LINE 221, IN RAISE_FOR_ERROR
   
           self.rewind()
   
           self.advance(1)  # field_count == error (we already know that)
   
           errno = self.read_uint16()
   
           if DEBUG:
   
               print("errno =", errno)
   
           err.raise_mysql_exception(self._data)
   
    
   
       def dump(self):
   
           dump_packet(self._data)
   
    
   
    

 * FILE "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/ERR.PY",
   LINE 143, IN RAISE_MYSQL_EXCEPTION
   
       errno = struct.unpack("<h", data[1:3])[0]
   
       errval = data[9:].decode("utf-8", "replace")
   
       errorclass = error_map.get(errno)
   
       if errorclass is None:
   
           errorclass = InternalError if errno < 1000 else OperationalError
   
       raise errorclass(errno, errval)

 * During handling of the above exception, another exception occurred:

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MIDDLEWARES.PY", LINE 16, IN
   __CALL__
   
    
   
    
   
   class StaticDataMiddleware(SharedDataMiddleware):
   
           def __call__(self, environ, start_response):
   
                   self.environ = environ
   
                   return super().__call__(environ, start_response)
   
    
   
           def get_directory_loader(self, directory):
   
                   def loader(path):
   
                           site = get_site_name(frappe.app._site or self.environ.get("HTTP_HOST"))
   
                           path = os.path.join(directory, site, "public", "files", cstr(path))

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/WERKZEUG/MIDDLEWARE/SHARED_DATA.PY",
   LINE 249, IN __CALL__
   
    
   
                   if file_loader is not None:
   
                       break
   
    
   
           if file_loader is None or not self.is_allowed(real_filename):  # type: ignore
   
               return self.app(environ, start_response)
   
    
   
           guessed_type = mimetypes.guess_type(real_filename)  # type: ignore
   
           mime_type = get_content_type(guessed_type[0] or self.fallback_mimetype, "utf-8")
   
           f, mtime, file_size = file_loader()
   
    

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/WERKZEUG/MIDDLEWARE/SHARED_DATA.PY",
   LINE 249, IN __CALL__
   
    
   
                   if file_loader is not None:
   
                       break
   
    
   
           if file_loader is None or not self.is_allowed(real_filename):  # type: ignore
   
               return self.app(environ, start_response)
   
    
   
           guessed_type = mimetypes.guess_type(real_filename)  # type: ignore
   
           mime_type = get_content_type(guessed_type[0] or self.fallback_mimetype, "utf-8")
   
           f, mtime, file_size = file_loader()
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/APP.PY", LINE 74, IN
   APPLICATION
   
           This is done to reduce response time by deferring expensive tasks."""
   
    
   
           @functools.wraps(app)
   
           def application(environ, start_response):
   
                   return ClosingIterator(
   
                           app(environ, start_response),
   
                           (
   
                                   frappe.rate_limiter.update,
   
                                   frappe.monitor.stop,
   
                                   frappe.recorder.dump,
   
                                   frappe.request.after_response.run,

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/WERKZEUG/WRAPPERS/REQUEST.PY",
   LINE 189, IN APPLICATION
   
           @functools.wraps(f)
   
           def application(*args):  # type: ignore
   
               request = cls(args[-2])
   
               with request:
   
                   try:
   
                       resp = f(*args[:-2] + (request,))
   
                   except HTTPException as e:
   
                       resp = e.get_response(args[-2])
   
                   return resp(*args[-2:])
   
    
   
           return t.cast("WSGIApplication", application)

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/APP.PY", LINE 128, IN
   APPLICATION
   
    
   
           except HTTPException as e:
   
                   return e
   
    
   
           except Exception as e:
   
                   response = handle_exception(e)
   
    
   
           else:
   
                   rollback = sync_database(rollback)
   
    
   
           finally:

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/APP.PY", LINE 320, IN
   HANDLE_EXCEPTION
   
                   frappe.get_request_header("Accept")
   
                   and (frappe.local.is_ajax or "application/json" in accept_header)
   
                   or (frappe.local.request.path.startswith("/api/") and not accept_header.startswith("text"))
   
           )
   
    
   
           allow_traceback = frappe.get_system_settings("allow_error_traceback") if frappe.db else False
   
    
   
           if not frappe.session.user:
   
                   # If session creation fails then user won't be unset. This causes a lot of code that
   
                   # assumes presence of this to fail. Session creation fails => guest or expired login
   
                   # usually.

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/__INIT__.PY", LINE 2300, IN
   GET_SYSTEM_SETTINGS
   
    
   
    
   
   def get_system_settings(key):
   
           if not hasattr(local, "system_settings"):
   
                   try:
   
                           local.system_settings = get_cached_doc("System Settings")
   
                   except DoesNotExistError:  # possible during new install
   
                           clear_last_message()
   
                           return
   
    
   
           return local.system_settings.get(key)

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/__INIT__.PY", LINE 1137, IN
   GET_CACHED_DOC
   
   def get_cached_doc(*args, **kwargs) -> "Document":
   
           if (key := can_cache_doc(args)) and (doc := cache.get_value(key)):
   
                   return doc
   
    
   
           # Not found in cache, fetch from DB
   
           doc = get_doc(*args, **kwargs)
   
    
   
           # Store in cache
   
           if not key:
   
                   key = get_document_cache_key(doc.doctype, doc.name)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/__INIT__.PY", LINE 1265, IN
   GET_DOC
   
                   todo = frappe.get_doc("ToDo", "TD0001")
   
    
   
           """
   
           import frappe.model.document
   
    
   
           doc = frappe.model.document.get_doc(*args, **kwargs)
   
    
   
           # Replace cache if stale one exists
   
           if not kwargs.get("for_update") and (key := can_cache_doc(args)) and cache.exists(key):
   
                   _set_document_in_cache(key, doc)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MODEL/DOCUMENT.PY", LINE 80, IN
   GET_DOC
   
                   if "doctype" in kwargs:
   
                           doctype = kwargs["doctype"]
   
                   else:
   
                           raise ValueError('"doctype" is a required key')
   
    
   
           controller = get_controller(doctype)
   
           if controller:
   
                   return controller(*args, **kwargs)
   
    
   
           raise ImportError(doctype)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MODEL/BASE_DOCUMENT.PY", LINE
   65, IN GET_CONTROLLER
   
    
   
           :param doctype: DocType name as string.
   
           """
   
    
   
           if frappe.local.dev_server or frappe.flags.in_migrate:
   
                   return import_controller(doctype)
   
    
   
           site_controllers = frappe.controllers.setdefault(frappe.local.site, {})
   
           if doctype not in site_controllers:
   
                   site_controllers[doctype] = import_controller(doctype)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/MODEL/BASE_DOCUMENT.PY", LINE
   80, IN IMPORT_CONTROLLER
   
           from frappe.model.document import Document
   
           from frappe.utils.nestedset import NestedSet
   
    
   
           module_name = "Core"
   
           if doctype not in DOCTYPES_FOR_DOCTYPE:
   
                   doctype_info = frappe.db.get_value("DocType", doctype, fieldname="*")
   
                   if doctype_info:
   
                           if doctype_info.custom:
   
                                   return NestedSet if doctype_info.is_tree else Document
   
                           module_name = doctype_info.module
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   516, IN GET_VALUE
   
    
   
                           # returns default date_format
   
                           frappe.db.get_value("System Settings", None, "date_format")
   
                   """
   
    
   
                   result = self.get_values(
   
                           doctype,
   
                           filters,
   
                           fieldname,
   
                           ignore,
   
                           as_dict,

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   617, IN GET_VALUES
   
    
   
                           if (filters is not None) and (filters != doctype or doctype == "DocType"):
   
                                   try:
   
                                           if order_by:
   
                                                   order_by = "modified" if order_by == DefaultOrderBy else order_by
   
                                           out = self._get_values_from_table(
   
                                                   fields=fields,
   
                                                   filters=filters,
   
                                                   doctype=doctype,
   
                                                   as_dict=as_dict,
   
                                                   debug=debug,

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   884, IN _GET_VALUES_FROM_TABLE
   
                           validate_filters=True,
   
                   )
   
                   if isinstance(fields, str) and fields == "*":
   
                           as_dict = True
   
    
   
                   return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
   
    
   
           def _get_value_for_many_names(
   
                   self,
   
                   doctype,
   
                   names,

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/QUERY_BUILDER/UTILS.PY", LINE
   87, IN EXECUTE_QUERY
   
           """
   
    
   
           def execute_query(query, *args, **kwargs):
   
                   child_queries = query._child_queries if isinstance(query._child_queries, list) else []
   
                   query, params = prepare_query(query)
   
                   result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
   
                   execute_child_queries(child_queries, result)
   
                   return result
   
    
   
           def execute_child_queries(queries, result):
   
                   if not queries or not result or not isinstance(result[0], dict) or not result[0].name:

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   212, IN SQL
   
    
   
                   # replaces ifnull in query with coalesce
   
                   query = IFNULL_PATTERN.sub("coalesce(", query)
   
    
   
                   if not self._conn:
   
                           self.connect()
   
    
   
                   # in transaction validations
   
                   self.check_transaction_status(query)
   
                   self.clear_db_table_cache(query)
   
    

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/DATABASE.PY", LINE
   118, IN CONNECT
   
                   pass
   
    
   
           def connect(self):
   
                   """Connects to a database as set in `site_config.json`."""
   
                   self.cur_db_name = self.user
   
                   self._conn: Union["MariadbConnection", "PostgresConnection"] = self.get_connection()
   
                   self._cursor: Union["MariadbCursor", "PostgresCursor"] = self._conn.cursor()
   
    
   
                   try:
   
                           if execution_timeout := get_query_execution_timeout():
   
                                   self.set_execution_timeout(execution_timeout)

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/MARIADB/DATABASE.PY",
   LINE 103, IN GET_CONNECTION
   
                   )
   
    
   
    
   
   class MariaDBConnectionUtil:
   
           def get_connection(self):
   
                   conn = self._get_connection()
   
                   conn.auto_reconnect = True
   
                   return conn
   
    
   
           def _get_connection(self):
   
                   """Return MariaDB connection object."""

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/MARIADB/DATABASE.PY",
   LINE 109, IN _GET_CONNECTION
   
                   conn.auto_reconnect = True
   
                   return conn
   
    
   
           def _get_connection(self):
   
                   """Return MariaDB connection object."""
   
                   return self.create_connection()
   
    
   
           def create_connection(self):
   
                   return pymysql.connect(**self.get_connection_settings())
   
    
   
           def set_execution_timeout(self, seconds: int):

 * FILE "/WORKSPACE/FRAPPE-15/APPS/FRAPPE/FRAPPE/DATABASE/MARIADB/DATABASE.PY",
   LINE 112, IN CREATE_CONNECTION
   
           def _get_connection(self):
   
                   """Return MariaDB connection object."""
   
                   return self.create_connection()
   
    
   
           def create_connection(self):
   
                   return pymysql.connect(**self.get_connection_settings())
   
    
   
           def set_execution_timeout(self, seconds: int):
   
                   self.sql("set session max_statement_time = %s", int(seconds))
   
    
   
           def get_connection_settings(self) -> dict:

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 358, IN __INIT__
   
               self._connect_attrs["program_name"] = program_name
   
    
   
           if defer_connect:
   
               self._sock = None
   
           else:
   
               self.connect()
   
    
   
       def __enter__(self):
   
           return self
   
    
   
       def __exit__(self, *exc_info):

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 664, IN CONNECT
   
               self._sock = sock
   
               self._rfile = sock.makefile("rb")
   
               self._next_seq_id = 0
   
    
   
               self._get_server_information()
   
               self._request_authentication()
   
    
   
               # Send "SET NAMES" query on init for:
   
               # - Ensure charaset (and collation) is set to the server.
   
               #   - collation_id in handshake packet may be ignored.
   
               # - If collation is not specified, we don't know what is server's

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 954, IN _REQUEST_AUTHENTICATION
   
                   v = v.encode("utf-8")
   
                   connect_attrs += _lenenc_int(len(v)) + v
   
               data += _lenenc_int(len(connect_attrs)) + connect_attrs
   
    
   
           self.write_packet(data)
   
           auth_packet = self._read_packet()
   
    
   
           # if authentication method isn't accepted the first byte
   
           # will have the octet 254
   
           if auth_packet.is_auth_switch_request():
   
               if DEBUG:

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/CONNECTIONS.PY",
   LINE 772, IN _READ_PACKET
   
    
   
           packet = packet_type(bytes(buff), self.encoding)
   
           if packet.is_error_packet():
   
               if self._result is not None and self._result.unbuffered_active is True:
   
                   self._result.unbuffered_active = False
   
               packet.raise_for_error()
   
           return packet
   
    
   
       def _read_bytes(self, num_bytes):
   
           self._sock.settimeout(self._read_timeout)
   
           while True:

 * FILE
   "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/PROTOCOL.PY",
   LINE 221, IN RAISE_FOR_ERROR
   
           self.rewind()
   
           self.advance(1)  # field_count == error (we already know that)
   
           errno = self.read_uint16()
   
           if DEBUG:
   
               print("errno =", errno)
   
           err.raise_mysql_exception(self._data)
   
    
   
       def dump(self):
   
           dump_packet(self._data)
   
    
   
    

 * FILE "/WORKSPACE/FRAPPE-15/ENV/LIB/PYTHON3.10/SITE-PACKAGES/PYMYSQL/ERR.PY",
   LINE 143, IN RAISE_MYSQL_EXCEPTION
   
       errno = struct.unpack("<h", data[1:3])[0]
   
       errval = data[9:].decode("utf-8", "replace")
   
       errorclass = error_map.get(errno)
   
       if errorclass is None:
   
           errorclass = InternalError if errno < 1000 else OperationalError
   
       raise errorclass(errno, errval)

> pymysql.err.OperationalError: (1045, "Access denied for user
> '_5138a6940bc28cb7'@'10.1.202.92' (using password: YES)")

This is the Copy/Paste friendly version of the traceback.

Traceback (most recent call last):
  File "/workspace/frappe-15/apps/frappe/frappe/app.py", line 95, in application
    init_request(request)
  File "/workspace/frappe-15/apps/frappe/frappe/app.py", line 191, in init_request
    frappe.local.http_request = HTTPRequest()
  File "/workspace/frappe-15/apps/frappe/frappe/auth.py", line 40, in __init__
    self.set_session()
  File "/workspace/frappe-15/apps/frappe/frappe/auth.py", line 76, in set_session
    frappe.local.login_manager = LoginManager()
  File "/workspace/frappe-15/apps/frappe/frappe/auth.py", line 121, in __init__
    self.make_session(resume=True)
  File "/workspace/frappe-15/apps/frappe/frappe/auth.py", line 209, in make_session
    frappe.local.session_obj = Session(
  File "/workspace/frappe-15/apps/frappe/frappe/sessions.py", line 214, in __init__
    self.resume()
  File "/workspace/frappe-15/apps/frappe/frappe/sessions.py", line 285, in resume
    validate_ip_address(self.user)
  File "/workspace/frappe-15/apps/frappe/frappe/auth.py", line 420, in validate_ip_address
    frappe.get_cached_value("User", user, user_fields, as_dict=True)
  File "/workspace/frappe-15/apps/frappe/frappe/__init__.py", line 1196, in get_cached_value
    doc = get_cached_doc(doctype, name)
  File "/workspace/frappe-15/apps/frappe/frappe/__init__.py", line 1137, in get_cached_doc
    doc = get_doc(*args, **kwargs)
  File "/workspace/frappe-15/apps/frappe/frappe/__init__.py", line 1265, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/workspace/frappe-15/apps/frappe/frappe/model/document.py", line 80, in get_doc
    controller = get_controller(doctype)
  File "/workspace/frappe-15/apps/frappe/frappe/model/base_document.py", line 65, in get_controller
    return import_controller(doctype)
  File "/workspace/frappe-15/apps/frappe/frappe/model/base_document.py", line 80, in import_controller
    doctype_info = frappe.db.get_value("DocType", doctype, fieldname="*")
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 516, in get_value
    result = self.get_values(
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 617, in get_values
    out = self._get_values_from_table(
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 884, in _get_values_from_table
    return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
  File "/workspace/frappe-15/apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 212, in sql
    self.connect()
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 118, in connect
    self._conn: Union["MariadbConnection", "PostgresConnection"] = self.get_connection()
  File "/workspace/frappe-15/apps/frappe/frappe/database/mariadb/database.py", line 103, in get_connection
    conn = self._get_connection()
  File "/workspace/frappe-15/apps/frappe/frappe/database/mariadb/database.py", line 109, in _get_connection
    return self.create_connection()
  File "/workspace/frappe-15/apps/frappe/frappe/database/mariadb/database.py", line 112, in create_connection
    return pymysql.connect(**self.get_connection_settings())
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 358, in __init__
    self.connect()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 664, in connect
    self._request_authentication()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 954, in _request_authentication
    auth_packet = self._read_packet()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 772, in _read_packet
    packet.raise_for_error()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user '_5138a6940bc28cb7'@'10.1.202.92' (using password: YES)")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/frappe-15/apps/frappe/frappe/middlewares.py", line 16, in __call__
    return super().__call__(environ, start_response)
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py", line 249, in __call__
    return self.app(environ, start_response)
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py", line 249, in __call__
    return self.app(environ, start_response)
  File "/workspace/frappe-15/apps/frappe/frappe/app.py", line 74, in application
    app(environ, start_response),
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 189, in application
    resp = f(*args[:-2] + (request,))
  File "/workspace/frappe-15/apps/frappe/frappe/app.py", line 128, in application
    response = handle_exception(e)
  File "/workspace/frappe-15/apps/frappe/frappe/app.py", line 320, in handle_exception
    allow_traceback = frappe.get_system_settings("allow_error_traceback") if frappe.db else False
  File "/workspace/frappe-15/apps/frappe/frappe/__init__.py", line 2300, in get_system_settings
    local.system_settings = get_cached_doc("System Settings")
  File "/workspace/frappe-15/apps/frappe/frappe/__init__.py", line 1137, in get_cached_doc
    doc = get_doc(*args, **kwargs)
  File "/workspace/frappe-15/apps/frappe/frappe/__init__.py", line 1265, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/workspace/frappe-15/apps/frappe/frappe/model/document.py", line 80, in get_doc
    controller = get_controller(doctype)
  File "/workspace/frappe-15/apps/frappe/frappe/model/base_document.py", line 65, in get_controller
    return import_controller(doctype)
  File "/workspace/frappe-15/apps/frappe/frappe/model/base_document.py", line 80, in import_controller
    doctype_info = frappe.db.get_value("DocType", doctype, fieldname="*")
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 516, in get_value
    result = self.get_values(
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 617, in get_values
    out = self._get_values_from_table(
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 884, in _get_values_from_table
    return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
  File "/workspace/frappe-15/apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 212, in sql
    self.connect()
  File "/workspace/frappe-15/apps/frappe/frappe/database/database.py", line 118, in connect
    self._conn: Union["MariadbConnection", "PostgresConnection"] = self.get_connection()
  File "/workspace/frappe-15/apps/frappe/frappe/database/mariadb/database.py", line 103, in get_connection
    conn = self._get_connection()
  File "/workspace/frappe-15/apps/frappe/frappe/database/mariadb/database.py", line 109, in _get_connection
    return self.create_connection()
  File "/workspace/frappe-15/apps/frappe/frappe/database/mariadb/database.py", line 112, in create_connection
    return pymysql.connect(**self.get_connection_settings())
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 358, in __init__
    self.connect()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 664, in connect
    self._request_authentication()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 954, in _request_authentication
    auth_packet = self._read_packet()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/connections.py", line 772, in _read_packet
    packet.raise_for_error()
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/workspace/frappe-15/env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user '_5138a6940bc28cb7'@'10.1.202.92' (using password: YES)")


The debugger caught an exception in your WSGI application. You can now look at
the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click
on the "Traceback" headline. From the text traceback you can also create a paste
of it. For code execution mouse-over the frame you want to debug and click on
the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some
extra helpers available for introspection:

 * dump() shows all variables in the frame
 * dump(obj) dumps all that's known about the object

Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback
interpreter.


CONSOLE LOCKED

The console is locked and needs to be unlocked by entering the PIN. You can find
the PIN printed out on the standard output of your shell that runs the server.

PIN: