1
votes

I've made a single-threaded Python program in PyDev, and after the program executes and reports that it's done, I get the following error message:

Exception in thread pydevd.CommandThread (most likely raised during interpreter shutdown):

It doesn't affect how my program runs, but it would be nice to have it not show up. I've run the program on the command line, and it doesn't produce any error messages like this.

Any suggestions?

1
Can you provide a shortened sample in your question such that I can reproduce this, please ? - Gauthier Boaglio
Take a look at my fix. I'm not sure why it works, but it seems that it had something to do with the way I was using the json library. - Kevin

1 Answers

0
votes

Apparently it was the way I was writing to a file using the built-in json library. I don't know why or if it was wrong, but I stopped the error by using

 file.write(json.dumps(dict, indent=4))

instead of

json.dump(dict, file, indent=4)

I'm not sure why this was producing the error, but changing this made it stop. If anyone can let me know why, that would be great.