Problem description
When i run my code using the “run” button, it says that the run isn’t configured and that i should open a .replit and configure that. i tried but it’s rather confusing and doesn’t help.
Expected behavior
the “run” button should output what I want my code to say
Actual behavior
it shows multiple error messages
Steps to reproduce
write any code and then it will give you your output. mine doesn’t do that.
Browser
chrome
OS
Mac
Device if mobile
n/a
Plan
free
1 Like
This is because the run button is configured to run main.py
and you are trying to run journal entry date time write.py
The simplest way would be to rename the file back to main.py
, (deleting the other one you currently have.) /or copy and paste the code from journal entry date time write.py
to main.py
Or, you could change the entrypoint
in the .replit config
file
You said you tried this but it didn’t help, I’m assuming this is because the file name you’re using has spaces in it.
You will need to remove the spaces in the file name, you can name it to something like JournalEntryDateTimeWrite.py
or journal_entry_date_time_write.py
Click the 3 dots button
and then click show hidden files
Open the .replit
config file and look for line 1 which says entrypoint = "main.py"
Simply change main
/main.py
to the name of the file that you want to run, in this case journal_entry_date_time_write.py
Click run, it may say it can’t find the file or directory. Click run again and it should work.
You could also go to the shell and enter kill 1
after changing the entrypoint and then click run, but either way should work.
Here is the docs page for configuring a repl, which may have more useful info. The main thing is just when you want to run a file other than main you need to change the entrypoint in the .repl file, and that the file name can’t have spaces in it.
3 Likes