Reputation: 336
I'm having the following error when I try to run a Flask app:
File "/home/patterson/Documentos/CPFL/cpfl/computer.py", line 12, in <module>
from cpfl.cpfl import sendmail
ImportError: cannot import name 'sendmail'
sendmail is a function I'm trying to import from the cpfl.py module which is a flask app. cpfl.py:
...
app = Flask(__name__)
...
The structure of my project is as follows:
I have no idea why import does not work. Could someone help-me?
Upvotes: 1
Views: 454
Reputation: 71
Have you tried import cpfl
and then when you call the method you use cpfl.sendmail
?
Upvotes: 1