librelist archives

« back to archive

Flask-Mail extension not found?

Flask-Mail extension not found?

From:
Todd Kennedy
Date:
2012-07-15 @ 05:09
Hey all.

I'm having an issue with the Flask-Mail extension not importing.

It is installed (using a virtualenv, you can see Flask-Mail 0.6.1 when I 
do a pip freeze), but when I try to import it using the old version (as 
noted in the documentation) or the new version (as noted on the Flask 
site), I get an import error.

Any ideas?

I can import anything else in the virtualenv (including lamson, nose, etc 
- the Flask_Mail requirements)

(p)22:03:12 (~)
todd@GreatApe> pip freeze | grep -i mail
Flask-Mail==0.6.1
(p)22:03:18 (~)
todd@GreatApe> python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from flaskext.mail import Mail
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mail
>>> from flask.ext.mail import Mail
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/exthook.py",
line 86, in load_module
    raise ImportError('No module named %s' % fullname)
ImportError: No module named flask.ext.mail
>>>

Re: [flask] Flask-Mail extension not found?

From:
Steven Kryskalla
Date:
2012-07-15 @ 05:42
On Sat, Jul 14, 2012 at 10:09 PM, Todd Kennedy <todd.kennedy@gmail.com> wrote:
> I'm having an issue with the Flask-Mail extension not importing.
> Any ideas?

How did you install flask and Flask-Mail? Just with "pip install"?

What happens if you do this?

>>> import flaskext
>>> flaskext
<module 'flaskext' (built-in)>
>>> flaskext.__path__
['/home/Steve/flaskmail_env/lib/python2.6/site-packages/flaskext']

If you go into that flaskext directory, what is inside?

$ find .
.
./mail
./mail/connection.py
./mail/connection.pyc
./mail/message.py
./mail/message.pyc
./mail/signals.py
./mail/signals.pyc
./mail/__init__.py
./mail/__init__.pyc

Re: [flask] Flask-Mail extension not found?

From:
Todd Kennedy
Date:
2012-07-15 @ 14:52
(p)22:28:20 (~/src/beerlogjs)
todd@GreatApe> python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import flaskext
>>> flaskext
<module 'flaskext' from 
'/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg/flaskext/__init__.pyc'>
>>> flaskext.__path__

['/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg/flaskext']
>>> ^D
(p)07:51:55 (~/src/beerlogjs)
todd@GreatApe> cd 
/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg/flaskext
(p)07:52:01 
(~/src/beerlogjs/p/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg/flaskext)
todd@GreatApe> ls
__init__.py	__init__.pyc	mail
(p)07:52:02 
(~/src/beerlogjs/p/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg/flaskext)
todd@GreatApe> find .
.
./__init__.py
./__init__.pyc
./mail
./mail/__init__.py
./mail/__init__.pyc
./mail/connection.py
./mail/connection.pyc
./mail/message.py
./mail/message.pyc
./mail/signals.py
./mail/signals.pyc
(p)07:52:23 
(~/src/beerlogjs/p/lib/python2.7/site-packages/Flask_Mail-0.6.1-py2.7.egg/flaskext)
todd@GreatApe> 


On Jul 14, 2012, at 10:42 PM, Steven Kryskalla wrote:

> On Sat, Jul 14, 2012 at 10:09 PM, Todd Kennedy <todd.kennedy@gmail.com> wrote:
>> I'm having an issue with the Flask-Mail extension not importing.
>> Any ideas?
> 
> How did you install flask and Flask-Mail? Just with "pip install"?
> 
> What happens if you do this?
> 
>>>> import flaskext
>>>> flaskext
> <module 'flaskext' (built-in)>
>>>> flaskext.__path__
> ['/home/Steve/flaskmail_env/lib/python2.6/site-packages/flaskext']
> 
> If you go into that flaskext directory, what is inside?
> 
> $ find .
> .
> ./mail
> ./mail/connection.py
> ./mail/connection.pyc
> ./mail/message.py
> ./mail/message.pyc
> ./mail/signals.py
> ./mail/signals.pyc
> ./mail/__init__.py
> ./mail/__init__.pyc

Re: [flask] Flask-Mail extension not found?

From:
pronoyc@gmail.com
Date:
2012-07-15 @ 07:04
Try from flask.ext.mail import Mail

On Sun, Jul 15, 2012 at 11:12 AM, Steven Kryskalla <skryskalla@gmail.com>wrote:

> On Sat, Jul 14, 2012 at 10:09 PM, Todd Kennedy <todd.kennedy@gmail.com>
> wrote:
> > I'm having an issue with the Flask-Mail extension not importing.
> > Any ideas?
>
> How did you install flask and Flask-Mail? Just with "pip install"?
>
> What happens if you do this?
>
> >>> import flaskext
> >>> flaskext
> <module 'flaskext' (built-in)>
> >>> flaskext.__path__
> ['/home/Steve/flaskmail_env/lib/python2.6/site-packages/flaskext']
>
> If you go into that flaskext directory, what is inside?
>
> $ find .
> .
> ./mail
> ./mail/connection.py
> ./mail/connection.pyc
> ./mail/message.py
> ./mail/message.pyc
> ./mail/signals.py
> ./mail/signals.pyc
> ./mail/__init__.py
> ./mail/__init__.pyc
>



-- 
Regards,

Pronoy Chopra
http://blog.pronoy.in <http://www.pronoy.in/about>/
http://www.twitter.com/pronoyc

Re: [flask] Flask-Mail extension not found?

From:
Todd Kennedy
Date:
2012-07-15 @ 14:52
Already tried that one :).



On Jul 15, 2012, at 12:04 AM, pronoyc@gmail.com wrote:

> Try from flask.ext.mail import Mail
> 
> On Sun, Jul 15, 2012 at 11:12 AM, Steven Kryskalla <skryskalla@gmail.com> wrote:
> On Sat, Jul 14, 2012 at 10:09 PM, Todd Kennedy <todd.kennedy@gmail.com> wrote:
> > I'm having an issue with the Flask-Mail extension not importing.
> > Any ideas?
> 
> How did you install flask and Flask-Mail? Just with "pip install"?
> 
> What happens if you do this?
> 
> >>> import flaskext
> >>> flaskext
> <module 'flaskext' (built-in)>
> >>> flaskext.__path__
> ['/home/Steve/flaskmail_env/lib/python2.6/site-packages/flaskext']
> 
> If you go into that flaskext directory, what is inside?
> 
> $ find .
> .
> ./mail
> ./mail/connection.py
> ./mail/connection.pyc
> ./mail/message.py
> ./mail/message.pyc
> ./mail/signals.py
> ./mail/signals.pyc
> ./mail/__init__.py
> ./mail/__init__.pyc
> 
> 
> 
> -- 
> Regards,
> 
> Pronoy Chopra
> http://blog.pronoy.in/
> http://www.twitter.com/pronoyc
> 

Re: [flask] Flask-Mail extension not found?

From:
Shriram Kunchanapalli
Date:
2012-07-15 @ 05:25
Can you give complete list of pip freeze ?

On Sunday, July 15, 2012, Todd Kennedy wrote:

> Hey all.
>
> I'm having an issue with the Flask-Mail extension not importing.
>
> It is installed (using a virtualenv, you can see Flask-Mail 0.6.1 when I
> do a pip freeze), but when I try to import it using the old version (as
> noted in the documentation) or the new version (as noted on the Flask
> site), I get an import error.
>
> Any ideas?
>
> I can import anything else in the virtualenv (including lamson, nose, etc
> - the Flask_Mail requirements)
>
> (p)22:03:12 (~)
> todd@GreatApe> pip freeze | grep -i mail
> Flask-Mail==0.6.1
> (p)22:03:18 (~)
> todd@GreatApe> python
> Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
> darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from flaskext.mail import Mail
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named mail
> >>> from flask.ext.mail import Mail
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> 
"/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/exthook.py",
> line 86, in load_module
>     raise ImportError('No module named %s' % fullname)
> ImportError: No module named flask.ext.mail
> >>>
>

Re: [flask] Flask-Mail extension not found?

From:
Todd Kennedy
Date:
2012-07-15 @ 05:28
Yup

todd@GreatApe> pip freeze
Fabric==1.4.3
Flask==0.9
Flask-Mail==0.6.1
FormEncode==1.2.4
Jinja2==2.6
PIL==1.1.7
SQLObject==1.3.1
Werkzeug==0.8.3
beautifulsoup4==4.1.1
beerlog==0.01
blinker==1.2
boto==2.5.2
chardet==1.0.1
gunicorn==0.14.5
lamson==1.1
lockfile==0.9.1
markdown2==2.0.0
mock==0.8.0
nose==1.1.2
pyandoc==0.0.1
pycrypto==2.6
python-daemon==1.6
python-dateutil==1.5
ssh==1.7.14
virtualenv==1.7.2
wsgiref==0.1.2



On Jul 14, 2012, at 10:25 PM, Shriram Kunchanapalli wrote:

> Can you give complete list of pip freeze ?
> 
> On Sunday, July 15, 2012, Todd Kennedy wrote:
> Hey all.
> 
> I'm having an issue with the Flask-Mail extension not importing.
> 
> It is installed (using a virtualenv, you can see Flask-Mail 0.6.1 when I
do a pip freeze), but when I try to import it using the old version (as 
noted in the documentation) or the new version (as noted on the Flask 
site), I get an import error.
> 
> Any ideas?
> 
> I can import anything else in the virtualenv (including lamson, nose, 
etc - the Flask_Mail requirements)
> 
> (p)22:03:12 (~)
> todd@GreatApe> pip freeze | grep -i mail
> Flask-Mail==0.6.1
> (p)22:03:18 (~)
> todd@GreatApe> python
> Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from flaskext.mail import Mail
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named mail
> >>> from flask.ext.mail import Mail
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File 
"/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/exthook.py",
line 86, in load_module
>     raise ImportError('No module named %s' % fullname)
> ImportError: No module named flask.ext.mail
> >>>

Re: [flask] Flask-Mail extension not found?

From:
Shriram Kunchanapalli
Date:
2012-07-15 @ 07:26
Good point, Steven
What does
import flask.ext.mail
import flaskext.mail
give ?

On 7/15/12, Todd Kennedy <todd.kennedy@gmail.com> wrote:
> Yup
>
> todd@GreatApe> pip freeze
> Fabric==1.4.3
> Flask==0.9
> Flask-Mail==0.6.1
> FormEncode==1.2.4
> Jinja2==2.6
> PIL==1.1.7
> SQLObject==1.3.1
> Werkzeug==0.8.3
> beautifulsoup4==4.1.1
> beerlog==0.01
> blinker==1.2
> boto==2.5.2
> chardet==1.0.1
> gunicorn==0.14.5
> lamson==1.1
> lockfile==0.9.1
> markdown2==2.0.0
> mock==0.8.0
> nose==1.1.2
> pyandoc==0.0.1
> pycrypto==2.6
> python-daemon==1.6
> python-dateutil==1.5
> ssh==1.7.14
> virtualenv==1.7.2
> wsgiref==0.1.2
>
>
>
> On Jul 14, 2012, at 10:25 PM, Shriram Kunchanapalli wrote:
>
>> Can you give complete list of pip freeze ?
>>
>> On Sunday, July 15, 2012, Todd Kennedy wrote:
>> Hey all.
>>
>> I'm having an issue with the Flask-Mail extension not importing.
>>
>> It is installed (using a virtualenv, you can see Flask-Mail 0.6.1 when I
>> do a pip freeze), but when I try to import it using the old version (as
>> noted in the documentation) or the new version (as noted on the Flask
>> site), I get an import error.
>>
>> Any ideas?
>>
>> I can import anything else in the virtualenv (including lamson, nose, etc
>> - the Flask_Mail requirements)
>>
>> (p)22:03:12 (~)
>> todd@GreatApe> pip freeze | grep -i mail
>> Flask-Mail==0.6.1
>> (p)22:03:18 (~)
>> todd@GreatApe> python
>> Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
>> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
>> darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> from flaskext.mail import Mail
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>> ImportError: No module named mail
>> >>> from flask.ext.mail import Mail
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File
>> 
"/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/exthook.py",
>> line 86, in load_module
>>     raise ImportError('No module named %s' % fullname)
>> ImportError: No module named flask.ext.mail
>> >>>
>
>

Re: [flask] Flask-Mail extension not found?

From:
Todd Kennedy
Date:
2012-07-15 @ 14:54
Odd:
That's working.

But, like all things computing, having rebooted my computer overnight 
seems to have killed this gremlin -- I am able to:
>>> from flask.ext.mail import Mail
>>> 


Now without a problem.

Argh.  I'd really like to know what was going on there though…

Thanks for everyone's time!

On Jul 15, 2012, at 12:26 AM, Shriram Kunchanapalli wrote:

> Good point, Steven
> What does
> import flask.ext.mail
> import flaskext.mail
> give ?
> 
> On 7/15/12, Todd Kennedy <todd.kennedy@gmail.com> wrote:
>> Yup
>> 
>> todd@GreatApe> pip freeze
>> Fabric==1.4.3
>> Flask==0.9
>> Flask-Mail==0.6.1
>> FormEncode==1.2.4
>> Jinja2==2.6
>> PIL==1.1.7
>> SQLObject==1.3.1
>> Werkzeug==0.8.3
>> beautifulsoup4==4.1.1
>> beerlog==0.01
>> blinker==1.2
>> boto==2.5.2
>> chardet==1.0.1
>> gunicorn==0.14.5
>> lamson==1.1
>> lockfile==0.9.1
>> markdown2==2.0.0
>> mock==0.8.0
>> nose==1.1.2
>> pyandoc==0.0.1
>> pycrypto==2.6
>> python-daemon==1.6
>> python-dateutil==1.5
>> ssh==1.7.14
>> virtualenv==1.7.2
>> wsgiref==0.1.2
>> 
>> 
>> 
>> On Jul 14, 2012, at 10:25 PM, Shriram Kunchanapalli wrote:
>> 
>>> Can you give complete list of pip freeze ?
>>> 
>>> On Sunday, July 15, 2012, Todd Kennedy wrote:
>>> Hey all.
>>> 
>>> I'm having an issue with the Flask-Mail extension not importing.
>>> 
>>> It is installed (using a virtualenv, you can see Flask-Mail 0.6.1 when I
>>> do a pip freeze), but when I try to import it using the old version (as
>>> noted in the documentation) or the new version (as noted on the Flask
>>> site), I get an import error.
>>> 
>>> Any ideas?
>>> 
>>> I can import anything else in the virtualenv (including lamson, nose, etc
>>> - the Flask_Mail requirements)
>>> 
>>> (p)22:03:12 (~)
>>> todd@GreatApe> pip freeze | grep -i mail
>>> Flask-Mail==0.6.1
>>> (p)22:03:18 (~)
>>> todd@GreatApe> python
>>> Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
>>> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
>>> darwin
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> from flaskext.mail import Mail
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>> ImportError: No module named mail
>>>>>> from flask.ext.mail import Mail
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>>  File
>>> 
"/Users/todd/src/beerlogjs/p/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/exthook.py",
>>> line 86, in load_module
>>>    raise ImportError('No module named %s' % fullname)
>>> ImportError: No module named flask.ext.mail
>>>>>> 
>> 
>>