Skip to content
← Back to Community
repl doesn't switch to Python if .replit is already valid
Profile icon
cyphar

It seems as though having a committed .replit in the repo results in repl.it not correctly "upgrading" the repl to Python and the language stays as Bash (meaning poetry doesn't auto-run). There is a modal which says "Upgrading to Python..." when creating a new repl from GitHub but the language remains Bash.

I'd ideally like some students be able to clone the repo https://github.com/ncss/necsus into their own repls, but the fact that .replit appears to cause issues with python dependency management is a bit annoying.

I have figured out a workaround -- to call poetry explicitly in .replit:

language = "python3" run = "poetry install && poetry run python server.py"

But it seems to me that this is not intentional behaviour. If .replit is missing, then the page asking you to specify the language pops up and if you submit it, then the language changes correctly (as you might expect).

Voters
Profile icon
cyphar
Comments
hotnewtop
Profile icon
Coder100

I don't see why the language icon is going to change how the repl runs, and I don't understand why you are obsessing over it.

Profile icon
cyphar

@Coder100 If the language is not Python, repl.it doesn't automatically install the dependencies using poetry.

I'm not obsessing over it, I'd prefer not to add extra unneeded steps in the list of instructions for students, when this should just work (and as far as I can tell, it is supposed to just work).

Profile icon
Coder100

set the language first, and then add the .replit file.

Profile icon
cyphar

@Coder100 I don't understand why that's necessary given that .replit specifies the language. If you don't have one, there is a dialogue panel which asks you for the language and run command -- which then generates a .replit file, indicating to me that this is supposed to work if I just specify .replit myself in the source repo.

And as I said, there is a modal which says "Upgrading to Python" (which is the same modal you get when you select the repl's language) which further points towards this being a bug in repl.it.

Profile icon
Coder100

It's because of their protocol, apparently there is no method of changing languages, but u can give this to feedback: https://repl.it/feedback @cyphar

Profile icon
cyphar

@Coder100 It seems to be an intermittent problem (it worked when I tried it again just now). But yeah I'll send it there -- I assumed the forums were intended for bug reports and general questions.

Profile icon
Coder100

ah, that's why there are two! @cyphar