How to fix this

Question:
It broke how
Repl link:
main.py - Live INFO count!!! - Replit
:grey_question: :question: :grey_question: :question:

A 500 internal server error means your server is experiencing an error when / is requested. Could you show use the error?

1 Like


When rendering a template, it must be in templates/file. It does not look like templates/index.html exists.

2 Likes

thx one more thing i am trying to make a repl which e.g i wanna make slope and use the http:// thing put it in the code and it slope appears when you run how do i do that

150 cycles reward

1 Like

Do you means put the slope game in a repl?

2 Likes

no that was and example

1 Like

I am unsure of what you mean.

1 Like

what code would i use to link a thing on the internet into a repl

2 Likes

Do you mean embed a site into yours?

2 Likes

image
like how swordbattle is linked onto this this

2 Likes

In that code the user is redirected to another url. To do that in flask, just import redirect from flask and instead of returning a response, do:

return redirect(url, http_code)
2 Likes

you need to put the url in a string

1 Like

here is an example:

from flask import Flask, redirect

app = Flask(__name__)

@app.route("/")
def home():
  return redirect("https://google.com")

app.run(host="0.0.0.0")

1 Like
I realized this post is only like 25% true but for the continuity of the thread I'll leave it here.

Try typing the / yourself. Probably what happened is that somehow you replaced the ASCII / with a unicode version and JS didn’t like that.

1 Like

it is a invalid character

1 Like

Oh my mistake. The quotes are your issue. Type the quotes yourself. When you copied them off of Ask you got the fancy unicode ones instead of the basic ASCII ones and Python doesn’t like that.

1 Like

nice but…