0

cmd traceback:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
                                                                ^
SyntaxError: invalid character in identifier

settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

Curious as I have been advised to do this to fix a problem I have with my project..(previous Q I have asked).

JosephS
  • 181
  • 1
  • 3
  • 13
  • There's not enough information here to answer your question. Could you link the related question and elaborate on you environment? – Alex Sep 28 '18 at 14:28
  • 1
    Isn't there a "hidden" space at the end? Also you might want to check the file for *eoln*s they differ on various *OS*es (although this shouldn't generate a problem). – CristiFati Sep 28 '18 at 14:29
  • 1
    as @CristiFati said, there could be an unwanted character at the end of line, so try to write it, instead of copy / paste. – aasmpro Sep 28 '18 at 14:33
  • The SyntaxError comes from an actual bad character in the python file. It shows nothing because it is probably not a rendered character [see this](https://stackoverflow.com/questions/14844687/invalid-character-in-identifier) . My suspicion is that you copied that line from somewhere and pasted it in and now there's a bad character in that line. Try to just type it out from scratch on a separate time. – Alex Sep 28 '18 at 14:33
  • Thanks...that worked. It doesn't fix my problem however. I still don't get a response in my cmd (for the email sent).. – JosephS Sep 28 '18 at 14:37
  • Don't repost your other question. Just include its *URL* (although I'm not sure what your expectations are). – CristiFati Sep 28 '18 at 14:48
  • so before in my project when I was trying out reset password...I would send an email to the localhost smtp and I would get a message and a link in the cmd 'You have received this message because you want to change password'' 127.0.01.8000/confirm48954987frhfrk' ..but now im not getting anything. That's what im trying to fix – JosephS Sep 28 '18 at 14:56
  • The [console backend](https://docs.djangoproject.com/en/2.1/topics/email/#console-backend) is used for testing - it writes the email to standard output instead of sending it. So if you actually want to send the email, you should be setting `EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'` – Alasdair Sep 28 '18 at 15:06

1 Answers1

0

The same happened to me. I copied the line from a blog. Check if the quotes for the string are the right characters: ' instead of ´, for example.