Windows automatic rebooting due to faulty code

R

Ronak Dhakan

I am learning python, and sometimes when I run a file with a faulty, windows gives a message that the system is rebooting and gives me 1 minute to save my work. Does anyone know how can I fix this? Most of the time a faulty code gives errors in python, but this is unique. I create files like Exercise 1.2.py and run it through IDLE.
 
C

Chris Angelico

I am learning python, and sometimes when I run a file with a faulty, windows gives a message that the system is rebooting and gives me 1 minute to save my work. Does anyone know how can I fix this? Most of the time a faultycode gives errors in python, but this is unique. I create files like Exercise 1.2.py and run it through IDLE.

I'm very much surprised that any Python coding error could do this.
What code triggers this? Is it consistent?

More likely it's something else in your system. Pure coincidence.

ChrisA
 
R

Ronak Dhakan

I'm very much surprised that any Python coding error could do this.

What code triggers this? Is it consistent?



More likely it's something else in your system. Pure coincidence.



ChrisA

Even I am surprised, python errors should stay in python. But I am sure that the reboot is triggered exactly when I run some faulty code. And usually I change the code after reboot, so I haven't checked whether the same code is able to repeat the reboot. This happens even in simple code of 10-15 lines for drawing a polygon.

There was a problem while creating the post asking the question. Here it isnow: https://groups.google.com/d/msg/comp.lang.python/WINUrOfAey4/pvbnapLrRcsJ
 
C

Chris Angelico

Even I am surprised, python errors should stay in python. But I am sure that the reboot is triggered exactly when I run some faulty code. And usually I change the code after reboot, so I haven't checked whether the same code is able to repeat the reboot. This happens even in simple code of 10-15 lines for drawing a polygon.

Aim for consistency and reproducibility. Figure out something that
always brings Windows down. More importantly... *tell us what modules
you are using*. What draws a polygon here? What are you working with?
That's kinda critical here, especially if (as I suspect) it's not part
of the Python standard library.
There was a problem while creating the post asking the question. Here it is now: https://groups.google.com/d/msg/comp.lang.python/WINUrOfAey4/pvbnapLrRcsJ

Solution: Get off Google Groups. Subscribe to (e-mail address removed)
and read it all in your email client, or read comp.lang.python in a
real newsreader. That'll fix several other problems too.

ChrisA
 
R

Ronak Dhakan

It is a small file to draw an approximate circle using Turtle. The reboot does not happen consistently. Here is the code: http://pastebin.com/8T3aRCEd

I was thinking whether there is a way to run python in a virtual environment.
 
T

Terry Reedy

It is a small file to draw an approximate circle using Turtle.
The reboot does not happen consistently. Here is the code:
http://pastebin.com/8T3aRCEd

from swampy.TurtleWorld import *
world = TurtleWorld()

This is not the turtle module in the stdlib. It is most like the source
of your reboot problem. Report your problem to the author. Also try
running your example in the Windows console. (Not nearly as nice, I
know.) There might possibly be a bad interaction with Idle.
 
M

Michael Torrie

Even I am surprised, python errors should stay in python. But I am
sure that the reboot is triggered exactly when I run some faulty
code. And usually I change the code after reboot, so I haven't
checked whether the same code is able to repeat the reboot. This
happens even in simple code of 10-15 lines for drawing a polygon.

There was a problem while creating the post asking the question. Here
it is now:
https://groups.google.com/d/msg/comp.lang.python/WINUrOfAey4/pvbnapLrRcsJ

Almost certainly you are experiencing a hardware fault. Possibly bad
RAM. Windows will not let user-space code crash the operating system.
Though user-space code could trigger something in the kernel that then
faults. This is likely what's happening here. But the real cause is
probably hardware. If it's not RAM, then it might be video hardware
failing.
 
I

Irmen de Jong

Almost certainly you are experiencing a hardware fault. Possibly bad
RAM. Windows will not let user-space code crash the operating system.
Though user-space code could trigger something in the kernel that then
faults. This is likely what's happening here. But the real cause is
probably hardware. If it's not RAM, then it might be video hardware
failing.

Or the computer has been infected by malware.



-I.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top