vintasoftware / django-templated-email

Django module to easily send templated emails using django templates, or using a transactional mail provider (mailchimp, silverpop, etc.)
MIT License
712 stars 130 forks source link

ImportError: cannot import name 'InlineImage' #83

Closed NatuMyers closed 8 years ago

NatuMyers commented 8 years ago

I follow the instructions as is, Import things in the correct order, I get:


Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x1060b4598>
Traceback (most recent call last):
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
    self.check(display_num_errors=True)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/management/base.py", line 426, in check
    include_deployment_checks=include_deployment_checks,
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/checks/registry.py", line 75, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    for pattern in resolver.url_patterns:
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/utils/functional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/urlresolvers.py", line 417, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/utils/functional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module
    return import_module(self.urlconf_name)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/Users/natumyers/Code/testappproject/testappdjango/testappdjango/urls.py", line 26, in <module>
    url('',include('testappapp.urls'))
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/site-packages/django/conf/urls/__init__.py", line 52, in include
    urlconf_module = import_module(urlconf_module)
  File "/Users/natumyers/Code/virtualenvpy34/testapp/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/Users/natumyers/Code/testappproject/testappdjango/testappapp/urls.py", line 2, in <module>
    from testappapp import views
  File "/Users/natumyers/Code/testappproject/testappdjango/testappapp/views.py", line 13, in <module>
    from templated_email import InlineImage
ImportError: cannot import name 'InlineImage'
aericson commented 8 years ago

What version are you using?

This is a new feature. It's not in Pypi yet, only in the develop branch.

I will update the README to make it clear the difference between the documentation of development vs stable version.

NatuMyers commented 8 years ago

Got you. I ran a pip install..