Arnaldo Acosta11,946 Points
TypeError: Expected bytes
So as soon as I submit a name for my bear I get an TypeError: Expected bytes. Any help would be much appreciated! The error log goes like this:
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
File "C:\Users\arnal_000\Desktop\Python\Flask\FlaskFirstProject\lib\site-packages\werkzeug_compat.py", line 190, in to_bytes raise TypeError('Expected bytes')
David StevensPython Web Development Techdegree Student 1,270 Points
save method in
app.py. It may be that it contains
response.set_cookie('character', data) when it really should be
Hope this helps!