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

ValueError: AsyncResult requires valid id, not <class 'NoneType'> when opening component-list of project #4247

Closed
Blaimi opened this issue Aug 3, 2020 · 2 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@Blaimi
Copy link
Contributor

Blaimi commented Aug 3, 2020

Describe the bug

When I want to open the component-List of a project, I get an internal server error. This happens for all configured projects. If the user has the project configured as watched project, the components are getting listet on the dashboard an stepping directly to the works like expected.

The projects are configured with "private" access control but it doesn't make a difference if set to "public".

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Projects' -> 'Browse all projects'
  2. Click on any project
  3. See error

Expected behavior

The list of the components for the project

Server configuration and status

Installation is done via pip3 on debian 10
***weblate list_versions

  • Weblate: 4.1.1
  • Django: 3.0.8
  • siphashc: 1.3
  • Whoosh: 2.7.4
  • translate-toolkit: 3.0.0
  • lxml: 4.5.2
  • Pillow: 7.1.2
  • bleach: 3.1.5
  • python-dateutil: 2.8.1
  • social-auth-core: 3.3.3
  • social-auth-app-django: 3.4.0
  • django-crispy-forms: 1.9.2
  • oauthlib: 3.1.0
  • django-compressor: 2.4
  • djangorestframework: 3.11.0
  • django-filter: 2.3.0
  • django-appconf: 1.0.4
  • user-agents: 2.1
  • filelock: 3.0.12
  • setuptools: 40.8.0
  • jellyfish: 0.8.2
  • openpyxl: 3.0.4
  • celery: 4.4.6
  • kombu: 4.6.11
  • translation-finder: 2.1
  • html2text: 2020.1.16
  • pycairo: 1.19.1
  • pygobject: 3.30.4
  • diff-match-patch: 20181111
  • requests: 2.21.0
  • django-redis: 4.12.1
  • hiredis: 1.0.1
  • sentry_sdk: 0.15.1
  • Cython: 0.29.21
  • misaka: 2.1.1
  • GitPython: 3.1.7
  • borgbackup: 1.1.13
  • pyparsing: 2.4.7
  • Python: 3.7.3
  • Git: 2.20.1
  • phply: 1.2.5
  • chardet: 3.0.4
  • ruamel.yaml: 0.16.10
  • mysqlclient: 2.0.1
  • git-review: 1.27.0
  • Redis server: 5.0.3
  • MariaDB sever: 10.3.22
  • Database backends: django.db.backends.mysql
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: irrelevant
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://localhost:6379, redis://localhost:6379, regular
  • Platform: Linux 4.19.0-9-amd64 (x86_64)

apache-config

<VirtualHost *:80>
    ServerAdmin irrelevant
    ServerName irrelevant

    # DATA_DIR/static/favicon.ico
    Alias /favicon.ico /usr/local/lib/python3.7/dist-packages/weblate/static/favicon.ico

    # DATA_DIR/static/
    Alias /static/CACHE/ /var/lib/weblate/static/CACHE/
    <Directory /var/lib/weblate/static/CACHE/>
        Require all granted
    </Directory>

    Alias /static/admin/ /usr/local/lib/python3.7/dist-packages/django/contrib/admin/static/admin/
    <Directory /usr/local/lib/python3.7/dist-packages/django/contrib/admin/static/admin/>
        Require all granted
    </Directory>

    Alias /static/ /usr/local/lib/python3.7/dist-packages/weblate/static/
    <Directory /usr/local/lib/python3.7/dist-packages/weblate/static/>
        Require all granted
    </Directory>

    # DATA_DIR/media/
    Alias /media/ /var/lib/weblate/media/
    <Directory /var/lib//weblate/media/>
        Require all granted
    </Directory>

    WSGIDaemonProcess weblate python-path=/usr/local/lib/python3.7/dist-packages/weblate/
    WSGIProcessGroup weblate
    WSGIApplicationGroup %{GLOBAL}

    WSGIScriptAlias / /usr/local/lib/python3.7/dist-packages/weblate/wsgi.py process-group=weblate
    WSGIPassAuthorization On

    <Directory /usr/local/lib/python3.7/dist-packages/weblate/>
        <Files wsgi.py>
        Require all granted
        </Files>
    </Directory>

    TimeOut 3600
    ProxyTimeOut 3600
</VirtualHost>

Weblate deploy checks

weblate check --deploy
System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
?: (weblate.W025.ass) Failure in loading handler for ass file format: aeidon or gaupol package required for Subtitle support
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#optional-deps
?: (weblate.W025.ini) Failure in loading handler for ini file format: Missing iniparse library.
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#optional-deps
?: (weblate.W025.islu) Failure in loading handler for islu file format: Missing iniparse library.
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#optional-deps
?: (weblate.W025.srt) Failure in loading handler for srt file format: aeidon or gaupol package required for Subtitle support
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#optional-deps
?: (weblate.W025.ssa) Failure in loading handler for ssa file format: aeidon or gaupol package required for Subtitle support
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#optional-deps
?: (weblate.W025.sub) Failure in loading handler for sub file format: aeidon or gaupol package required for Subtitle support
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#optional-deps
?: (weblate.W033.GitHub) Failure in loading VCS module for GitHub: [Errno 2] No such file or directory: 'hub': 'hub'
	HINT: https://docs.weblate.org/en/weblate-4.1.1/vcs.html
?: (weblate.W033.GitLab) Failure in loading VCS module for GitLab: [Errno 2] No such file or directory: 'lab': 'lab'
	HINT: https://docs.weblate.org/en/weblate-4.1.1/vcs.html
?: (weblate.W033.Mercurial) Failure in loading VCS module for Mercurial: [Errno 2] No such file or directory: 'hg': 'hg'
	HINT: https://docs.weblate.org/en/weblate-4.1.1/vcs.html
?: (weblate.W033.Subversion) Failure in loading VCS module for Subversion: git: 'svn' is not a git command. See 'git --help'.

The most similar command is
	serve
 (1)
	HINT: https://docs.weblate.org/en/weblate-4.1.1/vcs.html

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
	HINT: https://docs.weblate.org/en/weblate-4.1.1/admin/backup.html

System check identified 15 issues (1 silenced).

Exception traceback

ERROR Internal Server Error: /projects/irrelevant/
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/weblate/trans/views/basic.py", line 169, in show_project
    components = prefetch_tasks(prefetch_stats(get_paginator(request, all_components)))
  File "/usr/local/lib/python3.7/dist-packages/weblate/trans/models/component.py", line 164, in prefetch_tasks
    lookup[item].__dict__["background_task"] = AsyncResult(value)
  File "/usr/local/lib/python3.7/dist-packages/celery/result.py", line 99, in __init__
    'AsyncResult requires valid id, not {0}'.format(type(id)))
ValueError: AsyncResult requires valid id, not <class 'NoneType'>

Additional context

The system has been set up last week with all the configurations and users set up from scratch. Authentication is done via ldap.

@nijel nijel self-assigned this Aug 3, 2020
@nijel nijel added the bug Something is broken. label Aug 3, 2020
@nijel nijel modified the milestones: 4.3, 4.2 Aug 3, 2020
@nijel
Copy link
Member

nijel commented Aug 3, 2020

Fixed by 4a819b7

@nijel nijel closed this as completed Aug 3, 2020
@github-actions
Copy link

github-actions bot commented Aug 3, 2020

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants