Some python scripts will not terminate

Problem description:

When I run python scripts from the shell, some will terminate and others will not. It seems to be connected to importing replit db.

Expected behavior:


should execute the script, and return to bash shell prompt when finished.

Actual behavior:

Some scripts fail to terminate upon completion.

Steps to reproduce:

Go to this Repl: Go to the shell. Type:

python3 src/ my_argument

When I run this, the program executes properly but at the end it does not terminate and return to the bash prompt.

Alternatively, at the same command line, type:

python3 src/ my_argument

This is the same script but with the replit db interactions commented out. It executes properly and then exits.

I need this to terminate properly so I can update the replit db from a bash script. Also, I would be curious to know why this is happening.

A post was merged into an existing topic: Programs do not terminate when importing replit module