1

I have followed the installation steps provided by the repository provider of django-mailer

but when I try the ./manage.py test mailer command

or ./manage.py send_mail command

I receive this error:

from six.moves.urllib.parse import quote
ImportError: No module named urllib.parse

I receive this error on both my development machine and the production server.

On both I run Python 2.6

I already asked under issues tracker of django-mailer but there was no reply. As I really need to implement this sort of functionality in a few days on a project, this is my last atempt to use this otherwise I will have to come up with another solution.

Any suggestions would be very appreciated.

BR

Omid Raha
  • 9,862
  • 1
  • 60
  • 64
Ales Maticic
  • 1,895
  • 3
  • 13
  • 27

1 Answers1

3

I think your six version is equal or less than 1.3.0:

In [1]: import six
In [2]: six.__version__
Out[2]: '1.3.0'
In [3]: from six.moves.urllib.parse import quote
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-4680c55c65e8> in <module>()
----> 1 from six.moves.urllib.parse import quote

ImportError: No module named urllib.parse

try to upgrade six by:

pip install six --upgrade

Then import of quote is ok:

In [1]: import six

In [2]: six.__version__
Out[2]: '1.5.2'

In [3]: from six.moves.urllib.parse import quote
Omid Raha
  • 9,862
  • 1
  • 60
  • 64