본문 바로가기 주메뉴 바로가기 하단영역 바로가기
기업교육 · 수강문의 교육문의 02-557-1618
GangnamEnglish 강남영어

中國語 & 日本語

Let's English to eduRuns

  • 왕초보를 위한 속성 중국어 회화 - 기초편 (2)
  • 왕초보를 위한 속성 중국어 회화 - 기초편 (2)
    나 혼자 중국어 한다!
  • 강사정혜란, 박수진
  • 난이도기초/초급
  • 기간20시간/1개월
  • 샘플강의 보기
TypeError: expected string or bytes-like object // Werkzeug Debugger

builtins.TypeError

TypeError: expected string or bytes-like object

Traceback (most recent call last)

  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__

     
        def __call__(self, environ, start_response):
            """The WSGI server calls the Flask application object as the
            WSGI application. This calls :meth:`wsgi_app` which can be
            wrapped to applying middleware."""
            return self.wsgi_app(environ, start_response)
     
        def __repr__(self):
            return '<%s %r>' % (
                self.__class__.__name__,
                self.name,
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app

                try:
                    ctx.push()
                    response = self.full_dispatch_request()
                except Exception as e:
                    error = e
                    response = self.handle_exception(e)
                except:
                    error = sys.exc_info()[1]
                    raise
                return response(environ, start_response)
            finally:
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception

                # if we want to repropagate the exception, we can attempt to
                # raise it with the whole traceback in case we can do that
                # (the function was actually called from the except part)
                # otherwise, we just raise the error again
                if exc_value is e:
                    reraise(exc_type, exc_value, tb)
                else:
                    raise e
     
            self.log_exception((exc_type, exc_value, tb))
            if handler is None:
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise

        from io import StringIO
     
        def reraise(tp, value, tb=None):
            if value.__traceback__ is not tb:
                raise value.with_traceback(tb)
            raise value
     
        implements_to_string = _identity
     
    else:
        text_type = unicode
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app

            ctx = self.request_context(environ)
            error = None
            try:
                try:
                    ctx.push()
                    response = self.full_dispatch_request()
                except Exception as e:
                    error = e
                    response = self.handle_exception(e)
                except:
                    error = sys.exc_info()[1]
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request

                request_started.send(self)
                rv = self.preprocess_request()
                if rv is None:
                    rv = self.dispatch_request()
            except Exception as e:
                rv = self.handle_user_exception(e)
            return self.finalize_request(rv)
     
        def finalize_request(self, rv, from_error_handler=False):
            """Given the return value from a view function this finalizes
            the request by converting it into a response and invoking the
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception

                return self.handle_http_exception(e)
     
            handler = self._find_error_handler(e)
     
            if handler is None:
                reraise(exc_type, exc_value, tb)
            return handler(e)
     
        def handle_exception(self, e):
            """Default exception handling that kicks in when an exception
            occurs that is not caught.  In debug mode the exception will
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise

        from io import StringIO
     
        def reraise(tp, value, tb=None):
            if value.__traceback__ is not tb:
                raise value.with_traceback(tb)
            raise value
     
        implements_to_string = _identity
     
    else:
        text_type = unicode
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request

            self.try_trigger_before_first_request_functions()
            try:
                request_started.send(self)
                rv = self.preprocess_request()
                if rv is None:
                    rv = self.dispatch_request()
            except Exception as e:
                rv = self.handle_user_exception(e)
            return self.finalize_request(rv)
     
        def finalize_request(self, rv, from_error_handler=False):
  • File "/Users/pengpark/anaconda3/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request

            # request came with the OPTIONS method, reply automatically
            if getattr(rule, 'provide_automatic_options', False) \
               and req.method == 'OPTIONS':
                return self.make_default_options_response()
            # otherwise dispatch to the handler for that endpoint
            return self.view_functions[rule.endpoint](**req.view_args)
     
        def full_dispatch_request(self):
            """Dispatches the request and on top of that performs request
            pre and postprocessing as well as HTTP exception catching and
            error handling.
  • File "/Users/pengpark/Documents/PycharmProjects/Eduruns Macro/main.py", line 425, in course_textbook

        code = r[2]["강좌"]["샘플URL"].split("=")[1].replace("&drv", "").replace(" ", "")
        path = FILE_LOCATION + "/front/course/img/book_image/chinese/" + code + ".jpg"
     
        r = r[3]["교재"]
     
        if re.findall("[◉]", r["교재소개"]):
            s = re.split("[◉]", r["교재소개"])
     
            if s[0] == "":
                del s[0]
     
  • File "/Users/pengpark/anaconda3/lib/python3.6/re.py", line 222, in findall

        If one or more capturing groups are present in the pattern, return
        a list of groups; this will be a list of tuples if the pattern
        has more than one group.
     
        Empty matches are included in the result."""
        return _compile(pattern, flags).findall(string)
     
    def finditer(pattern, string, flags=0):
        """Return an iterator over all non-overlapping matches in the
        string.  For each match, the iterator returns a match object.
     
TypeError: expected string or bytes-like object

This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist:

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.

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: