Use variable in a sql query

Im having trouble using variables from a for loop to make querys in PostgreSQL (the connection to the databese works fine), heres the problem:

import pandas as pd
import pyodbc

conn_str = (
    "DRIVER={PostgreSQL Unicode};"
conn = pyodbc.connect(conn_str)
cursor = conn.cursor()

#I have the following list
movies = ["movie1","movie2","movie3","movie4"]

for x in movies:
    query =  "SELECT director, year, producer FROM db_movies WHERE name ='%s'" % x

    if x == "movie1":
        df_movie1 = pd.read_sql(query, conn)

    if x == "movie2":
        df_movie2 = pd.read_sql(query, conn)

    if x == "movie3":
        df_movie3 = pd.read_sql(query, conn)

    if x == "movie4":
        df_movie4 = pd.read_sql(query, conn)


But it keeps throwing "execution failed error"

I have tryied several options but none seams to work, I try doing the querys one at a time and it works.

Thanks you very much.