Python Interpreter hanging

I'm doing the quiz associated with the Days in Month part of unit 3. But there is something wrong with the python interpreter. When I open it, if I don't even modify the existing code at all and just hit run, it hangs forever on "working". If, while this is going on, I press another button, I get a dialogue box that says "something bad happened when communicating with this website." This happens in Chrome and in Safari. I've tried deleting cookies and cache, restarting computer, etc. Any advice?

asked 05 Mar '12, 16:20

bdme's gravatar image

bdme
76127
accept rate: 0%

Udacity is working to fix the interpreter, there´s a lot of traffic on servers, we need to wait.. =)

(05 Mar '12, 16:51) Uriel G Uriel%20G's gravatar image

8 Answers:

Maybe you've been stuck in a loop

link

answered 05 Mar '12, 16:22

Enrique%20Quero%20Vilar-2's gravatar image

Enrique Quer...
2321311

Your code may have an infinite loop. Please double check it to make sure that there is NO possible case where it won't return the expected value.

If you want you can post your code and we can help you find it.

link

answered 05 Mar '12, 16:24

Rob%20Barnes-3's gravatar image

Rob Barnes-3 ♦
19.1k1068205

edited 05 Mar '12, 16:51

The problem is not a loop. As I mentioned in the question, this happens even if I don't modify the code from the code that exists in the quiz before you start working on it. It also happens if, for example, I delete everything and just try to run

print "a"

link

answered 05 Mar '12, 16:39

bdme's gravatar image

bdme
76127

if it's hanging when you only have


print 'a'

and nothing else on the page, then clearly there is another issue. However, normally when people post this problem, it's because they've an error somewhere.

You said you've already restarted browser, machine, etc, so if a blank page with nothing but a print statement isn't responding for you, I don't personally have any other suggestions.

However, if you decide to post your code we can look at it. Normally it's a problem with someone's code (people post this question all the time)

(05 Mar '12, 16:45) Rob Barnes-3 ♦ Rob%20Barnes-3's gravatar image

Not sure why it rendered like that. Everything in bold has a pound sign in front of it in the actual code.

(06 Mar '12, 09:17) bdme bdme's gravatar image

I have the same problem, it is not a code problem. As he said, without any modification it hangs

(06 Mar '12, 12:01) Loïc Le Texier Lo%C3%AFc%20Le%20Texier's gravatar image

Currently, the online python interpreter is not working correctly due to high traffic. There are numerous threads in the forums about this but at the rate new questions get posted, those threads keep getting buried.

It's highly likely your code is fine but until the site issues get resolved, you'll have to use another python interpreter for testing.

link

answered 05 Mar '12, 16:49

antelm1978's gravatar image

antelm1978
10735

When 'that' happens I type the code into another python interpreter, make sure it works as required, then copy and paste it back to the browser and click Submit. The Submit appears to work fine. Good luck!

link

answered 05 Mar '12, 16:54

Martin%20Kohl's gravatar image

Martin Kohl
725

Here's an example (among many) of code that is hanging:

#Given the variable,

days_in_month = [31,28,31,30,31,30,31,31,30,31,30,31]

#define a procedure, how_many_days,
#that takes as input a number
#representing a month, and outputs
#the number of days in that month.

print days_in_month[3]

#how_many_days(1) => 31
#how_many_days(9) => 30

Here's another

print "a"

I've even tried using a different computer. No help.

link

answered 06 Mar '12, 09:16

bdme's gravatar image

bdme
76127

edited 06 Mar '12, 11:50

Rob%20Barnes-3's gravatar image

Rob Barnes-3 ♦
19.1k1068205

When you post code, you want to make sure it's formatted properly so we can read it.
Please review this post if you need to know how to format your code for the forums.

(06 Mar '12, 11:47) Rob Barnes-3 ♦ Rob%20Barnes-3's gravatar image

bdme, I'm in the same situation. I'm hoping Udacity will send out some sort of "ALL CLEAR". It's been 20 hours since I got stuck where you are and I just checked and I still can't get anything to work. It would really help if there were something in the announcements indicating there's a problem that Udacity is working on. Or tweets (since the one 16 hours ago saying the increase in traffic is causing troubles) or any update on facebook or G+ (other than to announce the new classes). I found the new site design this morning when I logged in. But getting into the course work for me means unit3.3 (days of the month problem) and if I plan on answering it, I cannot proceed. The interpreter hangs. Sigh... Frustrated by the lack of official response on this.

link

answered 06 Mar '12, 09:45

Susan%20Straub's gravatar image

Susan Straub
2.2k41747

I agree - seems to be a high traffic issue - i use another Python IDE = PyScripter , run and test the code then copy it into the web interpreter for submission. If you have a PC and have installed Python then u can use IDLE the Python Interpreter that comes with it

link

answered 06 Mar '12, 12:55

Mwebaze%20Ingabire%20Rita's gravatar image

Mwebaze Inga...
149211

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,284
×1,705
×164
×4

Asked: 05 Mar '12, 16:20

Seen: 404 times

Last updated: 06 Mar '12, 12:55