I am getting the following error while fetching data from Heroku,

Traceback (most recent call last):
  File "list.py", line 6, in <module>
    engine = create_engine(os.getenv("DATABASE_URL"))
  File "/opt/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
    return strategy.create(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 56, in create
    plugins = u._instantiate_plugins(kwargs)
AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'

Could you please help me with what this means and how do I go about solving this? I did set up my environment variable and am getting the right output if I write the following python program.

import os

Your help is much appreciated. Thank you


I had it work after pip-installed psycopg2-binary from the terminal.

pip install psycopg2-binary

Thank you

  • it doesn't work. – Shahbaaz Apr 21 '20 at 20:19
  • Thanks, but the error persists – livelinks Apr 24 '20 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .