title: Problem with linking flask and PostgreSQL. Error message: 'NoneType' object has no attribute '_instantiate_plugins'
body: <p>Code of import.py file is given below which is used to display entries of flights.csv file:</p>
  
  <pre><code>    import csv
      import os
  
      from sqlalchemy import create_engine
      from sqlalchemy.orm import scoped_session, sessionmaker
  
      engine = create_engine(os.getenv("DATABASE_URL"))
      db = scoped_session(sessionmaker(bind=engine))
  
      def main():
          f = open("flights.csv")
          reader = csv.reader(f)
  
          for origin, destination, duration in reader:
  
              db.execute("INSERT INTO flights (origin, destination, duration) 
              VALUES (:origin, :destination, :duration)",
              {"origin": origin, "destination": destination, "duration": 
              duration})
  
              print(f"Added flight from {origin} to {destination} lasting 
              {duration} minutes.")
  
          db.commit()
  
      if __name__ == "__main__":
          main()
  </code></pre>
  
  <p>}</p>
  
  <p><a href="https://i.stack.imgur.com/ONa5d.png" rel="nofollow noreferrer">Image shows the errors</a></p>