Problem Description:
I have just uploaded a Python file onto Replit for an online University course and ran the program. It installed all of the required libraries. The final thing it outputs is resolving dependencies so I assume this is what it gets stuck on. The CPU and RAM max out with the RAM going well over the limit.
Expected Behaviour:
For the program to run or crash producing an error message
Actual Behaviour:
The program seemingly does nothing for hours whilst the CPU and RAM max out. I assume it is âresolving dependenciesâ.
Steps to reproduce:
Go to https://replit.com/@DevourerRevenge/Degrees and run the program.
Bug appears at this link:
https://replit.com/@DevourerRevenge/Degrees
Browser/OS/Device:
Chrome, Gener8 and bing
I think your repl may be misconfigured, as it shouldnât be importing gardenlinux
. Iâll take a look and see what I can figure out.
Having some internet lag here, but this is a working solution for the meantime:
Ok, Iâll try that and get back to you on how I get on, thank you for your speedy response.
I followed your instructions (I think) and got the error message:
/nix/store/zqk3m21442kvpjwd3rh41wdavqkzkyik-python3-wrapper/bin/python3 $file
/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/bin/python3: canât open file â/home/runner/Degrees/main.pyâ: [Errno 2] No such file or directory
exit status 2
What should I do now?
Ah, thatâs a separate issue. Replit (by default) expects your main file to be called main.py
. In your case, itâs called degrees.py
, you can either rename it to main.py
, or follow this:
Click the ⎠next to âFilesâ then click âShow hidden filesâ. Next click on the .replit
file and finally you can change the entrypoint
to whatever file you want to run.
You should also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl
And if you want to run the last edited file, take a look at this post:
improved: add/change to start of
.replit
:onBoot = '''/nix/store/fbi9r30p3lqk96lmw5b1v1bpbj62cr2l-inotify-tools-3.20.11.0/bin/inotifywait -rqme create --format=%f%w --include='\..+\.py.[0-9]+~' .|while read f do f=${f#.} o= r= while read -r l||[ "$l" ] do case $r in "")case $l in entrypoint*)m="${l%\"*\"}\"${f#*~./}${f%.*~*}\"" case $m in "$l")break esac l=$m r=1 esac esac o="$o$l " false done<.replit||echo -n "$o">.replit done'''
And run
kill 1
in Shell.
This will map the entrypoint to the last file you edited through the IDE.
Replace.+\.py
on line 1 with the ERE of the files you want to be auto-set as entrypoint.
(I tried an option which checks for you just visiting the file in the editor but I found that thatâs impossible. Maybe you can do this with an extension)
If youâre on the new template, you might not have a entrypoint
set, if thatâs the case, you can just add one.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.