Sigh. This error keeps appearing, and never ceasing -- ever:

*** Unrecoverable, server exiting!
----------------------------------------

----------------------------------------
================================ RESTART ================================
>>> Unhandled server exception!
Thread: SockThread
Client Address:  ('127.0.0.1', 4323)
Request:  <socket.socket object, fd=1856, family=2, type=1, proto=0>
Traceback (most recent call last):
  File "C:\Python31\lib\socketserver.py", line 281, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python31\lib\socketserver.py", line 307, in process_request
    self.finish_request(request, client_address)
  File "C:\Python31\lib\socketserver.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python31\lib\idlelib\rpc.py", line 503, in __init__
    socketserver.BaseRequestHandler.__init__(self, sock, addr, svr)
  File "C:\Python31\lib\socketserver.py", line 614, in __init__
    self.handle()
  File "C:\Python31\lib\idlelib\run.py", line 259, in handle
    from idlelib import IOBinding
  File "C:\Python31\lib\idlelib\IOBinding.py", line 5, in <module>
    import tempfile
  File "C:\Python31\lib\tempfile.py", line 35, in <module>
    from random import Random as _Random
  File "random.py", line 32, in <module>
    guessNumber()
  File "random.py", line 5, in guessNumber
    number = random.randrange(1, 101)
AttributeError: 'module' object has no attribute 'randrange'

*** Unrecoverable, server exiting!
----------------------------------------

----------------------------------------================================ RESTART ================================
>>>

I don't know what caused this, but can anyone help?

Did this just start or has it happened always? It almost sounds like you may have inadvertently borked your Python install. I'd suggest a clean install.

It happened spontaneously after I did nothing to invoke it.
The last thing I had done was make a nonlocal variable global :P

I tried reinstalling... most likely was too lazy for it to be a clean one. Alright I'll try that and post back in a few minutes.

Yeah, it was borked somehow.
Anyway, a clean install fixed the problem!
Thanks for the quick response~

This question has already been answered. Start a new discussion instead.