Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Flask Basics Character Builder Items

"0.0.0.0 didn’t send any data." for another selection of bear's items.

Hi, It's probably something minor, but when I try to run another selection of the bear's items, I get "0.0.0.0 didn’t send any data" (error 302). The app also crashes when I try to go from the index page to the builder. Thank you in advance for your help!

Hey there agigryms

Could you provide a few more details so I can try to help you troubleshoot this?

  1. Are you running this locally(on your own machine) or are you using Treehouse Workspaces attached to this video?
  2. The "app crashes", are there any error messages? Like TypeError or what do the last few lines of the stack trace look like?

2 Answers

Hi Chris, Thank you for following up!

  1. I run the app locally.
  2. When the app crashes, I only see an error 302 for the POST method in the console and also "0.0.0.0 didn’t send any data. ERR_EMPTY_RESPONSE" in the browser.

Hey agigryms

  1. Are you sure you dont mean a response status code of 302? Which should be a page redirect. POSTing a form usually causes a redirect.
  2. You will have to paste in your code snippet for this ERR_EMPTY_RESPONSE. Basically the function that is called for POSTing the form. It is hard to troubleshoot without seeing some of the code involved in the error.

Use the Markdown Cheatsheet to see what to wrap around your code snippet so it is styled right when you paste it in.

Hi Chris,

True, 302 is not an error.

Hmm when I run the code from the Downloads (final version), I get the same error. So perhaps it's something related to the fact that I run the app locally.

Hey agigryms

So when I download the project files and run the Stage 3 Final app.py

I open my browser to: http://localhost:8000

I am able to see the Bear image and can type a name into the text box, when I click "Let's build it" button. It takes me to the: http://localhost:8000/save page with a TypeError. Is this what you are experiencing?

If not, can you describe in more detail what your error looks like in the browser and what info your terminal/command prompt output.