Exception happened during processing of request from ('127.0.0.1', 62246)

元气小坏坏 提交于 2020-12-27 07:22:10

问题


Hi all i'm getting this issue when i'm communicating with my app

At present i'm using flask and it is running on my local port

Here is the code for first error

    def _handle_request_noblock(self):
        """Handle one request, without blocking.

        I assume that selector.select() has returned that the socket is
        readable before this function was called, so there should be no risk of
        blocking in get_request().
        """
        try:
            request, client_address = self.get_request()
        except OSError:
            return
        if self.verify_request(request, client_address):
            try:
                self.process_request(request, client_address)(#error occuring at this line)
            except Exception:
                self.handle_error(request, client_address)
                self.shutdown_request(request)
            except:
                self.shutdown_request(request)
                raise
        else:
            self.shutdown_request(request)

2 nd error

    def process_request(self, request, client_address):
        """Call finish_request.

        Overridden by ForkingMixIn and ThreadingMixIn.

        """
        self.finish_request(request, client_address)(#error occuring at this line)
        self.shutdown_request(request)

3 rd error code

    def __init__(self, *args, directory=None, **kwargs):
        if directory is None:
            directory = os.getcwd()
        self.directory = directory
        super().__init__(*args, **kwargs) #error at this line

when i started communicating with the app it is showing error 503 and showing this error in the console

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/server.py", line 647, in __init__
    super().__init__(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/server.py", line 427, in handle
    self.handle_one_request()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/server.py", line 415, in handle_one_request
    method()
  File "/Users/admin/Library/Python/3.8/lib/python/site-packages/slack_bolt/app/app.py", line 880, in do_POST
    bolt_req = BoltRequest(
  File "/Users/admin/Library/Python/3.8/lib/python/site-packages/slack_bolt/request/request.py", line 43, in __init__
    self.context = build_context(BoltContext(context if context else {}), self.body)
  File "/Users/admin/Library/Python/3.8/lib/python/site-packages/slack_bolt/request/internals.py", line 114, in build_context
    enterprise_id = extract_enterprise_id(payload)
  File "/Users/admin/Library/Python/3.8/lib/python/site-packages/slack_bolt/request/internals.py", line 54, in extract_enterprise_id
    elif "id" in org:
TypeError: argument of type 'NoneType' is not iterable

i found this link is useful but there is no solution for the question and as well as i am new bee

can anyone help me in sorting this error?

来源:https://stackoverflow.com/questions/65220615/exception-happened-during-processing-of-request-from-127-0-0-1-62246

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!