Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

module initialization error: 'module' object has no attribute 'read_dotenv'

Line 14 of .py file:

dotenv.read_dotenv()

Yields this error:

AttributeError: 'module' object has no attribute 'read_dotenv'

(I'm a noob in training... Appreciate the help)

like image 576
Chris Avatar asked Apr 11 '16 02:04

Chris


1 Answers

I had the problem with Django, what solved it for me is uninstalling dotenv and python-dotenv and then reinstall django-dotenv

pip uninstall dotenv
pip uninstall python-dotenv
pip install django-dotenv
like image 90
Ahmed Farahat Avatar answered Sep 22 '22 15:09

Ahmed Farahat