• Members 2 posts
    May 12, 2018, 11:19 a.m.

    Hi everyone

    This is my first time use Misago
    I installed from pip and try to setting everything good
    But there is something happen when using register function
    In register session, i input everything it want like username, password, email
    misago show me an error message "Unknown error has occured."
    Could someone tell me how to solve this problem...
    Thank you very much.

    # Email configuration
    # https://docs.djangoproject.com/en/1.11/ref/settings/#email-backend
    
    EMAIL_HOST = 'localhost'
    EMAIL_PORT = 25
    
    
    # If either of these settings is empty, Django won't attempt authentication.
    
    EMAIL_HOST_USER = ''
    EMAIL_HOST_PASSWORD = ''
    
    
    # Default email address to use for various automated correspondence from the site manager(s).
    
    DEFAULT_FROM_EMAIL = 'Forums <%s>' % EMAIL_HOST_USER
    
    
    # Allow users to delete their own accounts?
    # Providing such feature is required by EU law from entities that process europeans personal data.
    
    MISAGO_ENABLE_DELETE_OWN_ACCOUNT = True
    
    Internal Server Error: /api/users/
    Traceback (most recent call last):
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
        response = get_response(request)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
        response = self.process_exception_by_middleware(e, request)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
        return view_func(*args, **kwargs)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/rest_framework/viewsets.py", line 90, in view
        return self.dispatch(request, *args, **kwargs)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/rest_framework/views.py", line 489, in dispatch
        response = self.handle_exception(exc)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/rest_framework/views.py", line 449, in handle_exception
        self.raise_uncaught_exception(exc)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/rest_framework/views.py", line 486, in dispatch
        response = handler(request, *args, **kwargs)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/misago/users/api/users.py", line 79, in create
        return create_endpoint(request)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
        response = view_func(request, *args, **kwargs)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/misago/users/api/userendpoints/create.py", line 68, in create_endpoint
        mail_user(request, new_user, mail_subject, 'misago/emails/register/complete')
      File "/home/npgogogo/.local/lib/python3.6/site-packages/misago/core/mail.py", line 22, in mail_user
        message.send()
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/mail/message.py", line 348, in send
        return self.get_connection(fail_silently).send_messages([self])
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/mail/backends/smtp.py", line 111, in send_messages
        sent = self._send(message)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/mail/backends/smtp.py", line 123, in _send
        from_email = sanitize_address(email_message.from_email, encoding)
      File "/home/npgogogo/.local/lib/python3.6/site-packages/django/core/mail/message.py", line 161, in sanitize_address
        address = Address(nm, addr_spec=addr)
      File "/usr/lib/python3.6/email/headerregistry.py", line 42, in __init__
        a_s, rest = parser.get_addr_spec(addr_spec)
      File "/usr/lib/python3.6/email/_header_value_parser.py", line 1986, in get_addr_spec
        token, value = get_local_part(value)
      File "/usr/lib/python3.6/email/_header_value_parser.py", line 1798, in get_local_part
        if value[0] in CFWS_LEADER:
    IndexError: string index out of range
    
    
  • May 12, 2018, 5:14 p.m.
    check_box

    Marked as best answer by May 12, 2018, 6:10 p.m..

    If this is your localhost, install Docker and clone our repository from GitHub instead. It takes care of everything for you and makes Misago run with all dependencies installed and configured in three terminal commands, without polluting your system.

    Otherwhise fill in EMAIL_HOST_USER with anything (even hello@example.com will do), and then add somewhere to your settings:

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

    That will disable email sending.

  • Members 2 posts
    May 12, 2018, 6:04 p.m.

    It solved!!!
    Thanks for you help