Coder Social home page Coder Social logo

aldryn / aldryn-emailsettings Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 15 KB

A simple configuration app to set the email settings in Aldryn projects

Home Page: http://www.aldryn.com/en/marketplace/aldryn-emailsettings/

License: Other

Python 100.00%

aldryn-emailsettings's People

Contributors

evildmp avatar filwaitman avatar finalangel avatar mikek avatar mociepka avatar stefanfoulis avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aldryn-emailsettings's Issues

Encoding issue on Py3.5

When using this addon on a Python 3.5 project I get the following error:

Internal Server Error: snipped
Traceback (most recent call last):
  File "/virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/virtualenv/lib/python3.5/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/virtualenv/lib/python3.5/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/virtualenv/lib/python3.5/site-packages/django/contrib/admin/sites.py", line 244, in inner
    return view(request, *args, **kwargs)
  File "/virtualenv/lib/python3.5/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/virtualenv/lib/python3.5/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/virtualenv/lib/python3.5/site-packages/django_object_actions/utils.py", line 240, in get
    ret = view(request, *self.view_args)

  ... snipped business logic ...

  File "/app/mail/mail.py", line 60, in send_email
    return message.send()
  File "/virtualenv/lib/python3.5/site-packages/django/core/mail/message.py", line 292, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/virtualenv/lib/python3.5/site-packages/django/core/mail/backends/smtp.py", line 100, in send_messages
    new_conn_created = self.open()
  File "/virtualenv/lib/python3.5/site-packages/django/core/mail/backends/smtp.py", line 67, in open
    self.connection.login(self.username, self.password)
  File "/usr/local/lib/python3.5/smtplib.py", line 720, in login
    initial_response_ok=initial_response_ok)
  File "/usr/local/lib/python3.5/smtplib.py", line 637, in auth
    authobject(challenge).encode('ascii'), eol='')
AttributeError: 'bytes' object has no attribute 'encode'

This is most likely caused to a double encoding happening in

It can be easily be reproduced like this:

>>> s = 'test'
>>> e = s.encode('ascii')
>>> e
b'test'
>>> e.encode('ascii')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'bytes' object has no attribute 'encode'

After removing the encode calls in aldryn_config.py it worked fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.