Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use email #4978

Closed
eqMFqfFd opened this issue Dec 4, 2020 · 6 comments
Closed

Can't use email #4978

eqMFqfFd opened this issue Dec 4, 2020 · 6 comments
Labels
question This is more a question for the support than an issue.

Comments

@eqMFqfFd
Copy link

eqMFqfFd commented Dec 4, 2020

Describe the issue

EMAIL_HOST = X
EMAIL_HOST_PASSWORD = X
EMAIL_USE_TLS = True
EMAIL_HOST_USER = X
EMAIL_PORT = 587

I already tried

  • Restarting the server.
  • Checking for any typos in the settings.py error.
    I cannot use email.

I've noticed that emails don't get sent so I've had to configure outgoing (SMTP) mail. Using the configuration below (taken from Django Docs) it didn't work. I get a 500 Internal Server Error when I try to access my Weblate and the following message in the apache logs.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the Weblate website.
  2. See error.

Traceback (most recent call last):
  File "/home/weblate-env/lib/python3.6/site-packages/weblate/runner.py", line 32, in main
    execute_from_command_line(argv)
  File "/home/weblate-env/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/weblate-env/lib/python3.6/site-packages/django/core/management/__init__.py", line 345, in execute
    settings.INSTALLED_APPS
  File "/home/weblate-env/lib/python3.6/site-packages/django/conf/__init__.py", line 83, in __getattr__
    self._setup(name)
  File "/home/weblate-env/lib/python3.6/site-packages/django/conf/__init__.py", line 70, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/weblate-env/lib/python3.6/site-packages/django/conf/__init__.py", line 177, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/home/weblate-env/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/weblate-env/lib/python3.6/site-packages/weblate/settings.py", line 862, in <module>
    EMAIL_HOST = imap.mail.me.com
NameError: name 'imap' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "./weblate", line 8, in <module>
    sys.exit(main())
  File "/home/weblate-env/lib/python3.6/site-packages/weblate/runner.py", line 36, in main
    report_error()
  File "/home/weblate-env/lib/python3.6/site-packages/weblate/utils/errors.py", line 60, in report_error
    if not skip_sentry and settings.SENTRY_DSN:
  File "/home/weblate-env/lib/python3.6/site-packages/django/conf/__init__.py", line 83, in __getattr__
    self._setup(name)
  File "/home/weblate-env/lib/python3.6/site-packages/django/conf/__init__.py", line 70, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/weblate-env/lib/python3.6/site-packages/django/conf/__init__.py", line 177, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/home/weblate-env/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/weblate-env/lib/python3.6/site-packages/weblate/settings.py", line 862, in <module>
    EMAIL_HOST = imap.mail.me.com
NameError: name 'imap' is not defined

Expected behavior

Weblate should load.

Server configuration and status

 * Weblate: 4.3.2
 * Django: 3.1.3
 * siphashc: 2.1
 * Whoosh: 2.7.4
 * translate-toolkit: 3.2.0
 * lxml: 4.6.1
 * Pillow: 8.0.1
 * bleach: 3.2.1
 * python-dateutil: 2.8.1
 * social-auth-core: 3.3.3
 * social-auth-app-django: 4.0.0
 * django-crispy-forms: 1.9.2
 * oauthlib: 3.1.0
 * django-compressor: 2.4
 * djangorestframework: 3.12.2
 * django-filter: 2.4.0
 * django-appconf: 1.0.4
 * user-agents: 2.2.0
 * filelock: 3.0.12
 * setuptools: 50.3.2
 * jellyfish: 0.8.2
 * openpyxl: 3.0.5
 * celery: 4.4.7
 * kombu: 4.6.11
 * translation-finder: 2.5
 * weblate-language-data: 2020.11
 * html2text: 2020.1.16
 * Platform: Linux 4.15.0-126-generic (x86_64)
@eqMFqfFd eqMFqfFd added the question This is more a question for the support than an issue. label Dec 4, 2020
@github-actions
Copy link

github-actions bot commented Dec 4, 2020

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@nijel
Copy link
Member

nijel commented Dec 4, 2020

I get a 500 Internal Server Error when I try to access my Weblate and the following message in the apache logs.

Sorry, but I don't see the message which is in your logs. Can you please pay attention to posting issues here so that they contain useful information? Also it's usually useful to search existing issues and the documentation.

@eqMFqfFd
Copy link
Author

eqMFqfFd commented Dec 4, 2020

@nijel I apologize, I forgot it in my rush. I've updated my issue with the specific error.

@nijel
Copy link
Member

nijel commented Dec 5, 2020

You are missing quotes around the string in the settings.py...

@nijel nijel closed this as completed Dec 5, 2020
@github-actions
Copy link

github-actions bot commented Dec 5, 2020

The issue you have reported is resolved now. If you don’t feel it’s right, please follow it’s labels to get a clue and take further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@eqMFqfFd
Copy link
Author

eqMFqfFd commented Jan 3, 2021

@nijel There is no syntax error. Logs:

 ● celery-weblate.service - Celery Service (Weblate)
   Loaded: loaded (/etc/systemd/system/celery-weblate.service; enabled; vendor preset: enabled)
   Active: activating (start) since Sun 2021-01-03 16:18:00 UTC; 8s ago
  Process: 31749 ExecStop=/bin/sh -c ${CELERY_BIN} multi stopwait ${CELERYD_NODES}    --pidfile=${CELERYD_PID_FILE}
Cntrl PID: 31765 (sh)
    Tasks: 7 (limit: 1107)
   CGroup: /system.slice/celery-weblate.service
           ├─31765 /bin/sh -c /home/weblate-env/bin/celery multi start celery notify memory backup translate    -A 
           ├─31767 /home/weblate-env/bin/python3.6 /home/weblate-env/bin/celery multi start celery notify memory ba
           ├─31798 /home/weblate-env/bin/python3.6 -m celery worker --loglevel=INFO --beat --queues=celery --prefet
           ├─31813 /home/weblate-env/bin/python3.6 -m celery worker --loglevel=INFO --queues=notify --prefetch-mult
           ├─31836 /home/weblate-env/bin/python3.6 -m celery worker --loglevel=INFO --queues=memory --prefetch-mult
           ├─31973 /home/weblate-env/bin/python3.6 -m celery worker --loglevel=INFO --concurrency=1 --queues=backup
           └─31974 /home/weblate-env/bin/python3.6 -m celery worker --detach --pidfile=/run/celery/weblate-translat
Jan 03 16:18:00 ubuntu systemd[1]: Stopped Celery Service (Weblate).
Jan 03 16:18:00 ubuntu systemd[1]: Starting Celery Service (Weblate)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants