main.py
from flask import Flask
import pickle
import pandas as pd
app = Flask(__name__)
with open('C:\\Users\\captain\\Desktop\\flask\\my-project\\movies.pkl', 'rb') as f:
Movies = pickle.load(f)
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
The code shown above is giving this error (shown in image) when I run "flask --app main run" this statement :
But while running the main.py in the console it runs perfectly and I was able to print the Movies data using the print statement.
the data type of Movies = <class 'pandas.core.frame.DataFrame'>
I was just expecting that the Flask app would run fine without any errors.