You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrong encoding leads to message from the cron like:
/usr/local/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
Starting sending newsletters...
Traceback (most recent call last):
File "/data/www/django/djangosite/manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.6/site-packages/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/data/www/django/djangosite/emencia/django/newsletter/management/commands/send_newsletter.py", line 23, in handle_noargs
print 'Start emailing %s' % newsletter.title
UnicodeEncodeError: 'ascii' codec can't encode characters in position 25-31: ordinal not in range(128)
This fix is a draft, because proper encoding fix should probably use current system locale, fixing unprintable characters
--- send_newsletter.py.orig+++ send_newsletter.py @@ -20,7 +20,7 @@
mailer = Mailer(newsletter)
if mailer.can_send:
if verbose:
- print 'Start emailing %s' % newsletter.title+ print 'Start emailing %s' % unicode(newsletter.title).encode('utf-8')
mailer.run()
if verbose:
The text was updated successfully, but these errors were encountered:
Wrong encoding leads to message from the cron like:
This fix is a draft, because proper encoding fix should probably use current system locale, fixing unprintable characters
The text was updated successfully, but these errors were encountered: