Forums

My website won't load

Hey guys, so my website fails to load now

It happened after I updated my flask code to read data from a spreadsheet. Here is the code & spreadsheet:

from flask import Flask, request, render_template
import pandas as pd

app = Flask(__name__)

# Load the master spreadsheet
df = pd.read_csv(r'/home/Walt1000/Strain Data(1).csv')  # Ensure the filename matches your uploaded CSV

@app.route('/')
def index():
    # Extract desired states from the columns (excluding 'Strain Name')
    desired_states = df.columns.tolist()
    desired_states.remove('Strain Name')
    return render_template('main_page.html', desired_states=desired_states)

@app.route('/submit', methods=['POST'])
def submit():
    try:
        print("

[edit by admin: formatting]

It looks like your code was cut off there. However, what do you see when you visit your website? Is there an error?

Hi, yes, when I try to access my website, this is what shows up: enter image description here

Could you either copy the text message or check your web app's (error) logs and see if there's anything relevant?