Repl freezes while testing main.py

For Data Analysis with Python course on Freecodecamp I imported aboilerplate-page-view-time-series-visualizer code files with test files. I tested the main.py (which uses the main code file and testing files) for this task on my laptop and the tests were OK. The output of the code is 3 .png images with graph plots.

But in replit after I click 'Run", there’s the first line plot shown in the output window
and then the console sort of freezes (i.e. seemingly does nothing yet while not ready for input commands until I click “Stop”) for an hour or more.

After the first bootup of the repl I need to 'pip install pandas, matplotlib, seaborn" and any other required modules as it doesn’t find any of them installed.

While testing main.py on my laptop I get the first line plot image pop up as output, I close it then the console freezes for ~1-2 minutes and outputs a dozen more .png images. I close all of them and then there is a message that all tests have been run ok. Here’s the sample of what I’m getting in the console on my laptop:

$ python3 main.py
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
...........
----------------------------------------------------------------------
Ran 11 tests in 24.996s

OK

There’s some issue with AMD radeon GPU drivers, but the tests still run OK.

While testing the same main.py in Replit it outputs the first line plot, I close the output, and it freezes for hours.

Also a couple of days ago in Replit home under “My repls” I clicked some “IdealisticClosedGeeklog” and this installed some nix environment, so my repls are now nix (not sure what this means), but I can’t reverse it.

How can this repl be made to run the tests/main.py ?

If the Nix Migration broke your existing Repl, try regenerating the virtual environment by running curl https://pythonify.util.repl.co/recreate_python3_venv.sh | bash in the shell.

2 Likes