Skip to content
Sign upLog in
← Back to Community

Github repo being detected as Bash instead of Python

Profile icon
mrjsngHacker

Hi,

I am having some difficulty getting an imported Github repo to be detected as a Python project. Whenever I create a new repo by importing the GitHub project, it gets detected as a Bash project.

When I only have main.py in the project, it gets detected as Bash project.

I then added a .replit file with the following contents:

language = "python3" run = "python main.py"

When I import the repo again with this file, it still gets detected as a Bash project.

Any idea what I need to do to get it imported as a Python project?

Voters
Profile icon
MicahMaphet
Profile icon
k4kat
Profile icon
mrjsng
Comments
hotnewtop
Profile icon
Coder100

Hello, there is really no difference between a bash repl and a python repl. A bash repl is basically a terminal, so it's just python with extra steps. If you try to run it, given that you have a main.py in the relative folder, it should work fine.

Hope this helps!

Profile icon
mrjsng

@Coder100
I had hoped that would be the case, but I am getting strange SyntaxErrors that did not happen with the Python repl.

I wrote the code in a Python repl, then created a Github repo through the Version Control panel. Then I created a new repl by importing that repo (to simulate what my students would be seeing). The imported repo keeps getting detected as Bash, and the code threw SyntaxErrors even though it is the exact same code.

Profile icon
mrjsng

The original (Python) repl: https://repl.it/join/qpcctexa-mrjsng

The imported (Bash) repl: https://repl.it/join/ndidrbbb-mrjsng

Profile icon
CodeLongAndPros

Did you commit .replit to your repo?

Profile icon
mrjsng

Yup, I committed and pushed it. Tried importing again, still Bash. Deleted .replit, committed, and pushed Imported again, still Bash.

Profile icon
jzaldivar

Hi,

@mrjsng
. Were you able to fix this error. How did you do it. I just began using github classroom and Replit and had the same problem: a Python repl is detected as bash and nothing happens when I press the Run button plus the console is a bash console.