Skip to content

module 'weblate.trans.models.component' has no attribute 'DoesNotExist' #3003

Description

@romanr

Installed weblate with default settings (Docker).
Added module in admin interface without error.
When opening the translation web page error occurs.

To Reproduce
Steps to reproduce the behavior:

  1. Added module in admin interface
  2. Go to module translation page

Request Method: | GET
-- | --
https://translate/projects/project/
2.2.4
AttributeError
module 'weblate.trans.models.component' has no attribute 'DoesNotExist'
/usr/local/lib/python3.7/dist-packages/celery/backends/base.py in exception_to_python, line 276
/usr/bin/uwsgi-core
3.7.3
['/',  '/usr/local/lib/python3.7/dist-packages/',  '.',  '',  '/usr/lib/python37.zip',  '/usr/lib/python3.7',  '/usr/lib/python3.7/lib-dynload',  '/usr/local/lib/python3.7/dist-packag

Traceback

** /usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py in inner**

Variable | Value
-- | --
exc | AttributeError("module 'weblate.trans.models.component' has no attribute 'DoesNotExist'")
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fa7caffdd68>>
request | <WSGIRequest: GET '/projects/project/'>



meta | {'children': [],  'date_done': '2019-09-08T07:02:31.589674',  'result': {'exc_message': ['Component matching query does not exist.'],            
 'exc_module': 'weblate.trans.models.component',             'exc_type': 'DoesNotExist'},  'status': 'FAILURE',  'task_id': 'a3eebaec-6338-43db-9897-7eb56f5be02e',  
'traceback': 'Traceback (most recent call last):\n'               '  File ' 
              '"/usr/local/lib/python3.7/dist-packages/celery/app/trace.py", '   
            'line 385, in trace_task\n'               '    R = retval = fun(*args, **kwargs)\n'  
             '  File '               '"/usr/local/lib/python3.7/dist-packages/celery/app/trace.py", ' 
              'line 648, in __protected_call__\n'               '    return self.run(*args, **kwargs)\n'    
           '  File '               '"/usr/local/lib/python3.7/dist-packages/weblate/trans/tasks.py", '  
             'line 333, in component_after_save\n'             
  '    component = Component.objects.get(pk=pk)\n'              
 '  File '              
 '"/usr/local/lib/python3.7/dist-packages/django/db/models/manager.py", '              
 'line 82, in manager_method\n'               
'    return getattr(self.get_queryset(), name)(*args, **kwargs)\n' 
              '  File '
               '"/usr/local/lib/python3.7/dist-packages/django/db/models/query.py", '
               'line 408, in get\n'
               '    self.model._meta.object_name\n' 
              'weblate.trans.models.component.Component.DoesNotExist: ' 
              'Component matching query does not exist.\n'}

-- | --
self | <celery.backends.redis.RedisBackend object at 0x7fa7cc8cf240>


Server configuration and status

Using docker-compose:

docker-compose exec weblate weblate list_versions

 * Weblate 3.8
 * Python 3.7.3
 * Django 2.2.4
 * Celery 4.3.0
 * celery-batches 0.2
 * six 1.12.0
 * social-auth-core 3.2.0
 * social-auth-app-django 3.1.0
 * django-appconf 1.0.3
 * translate-toolkit 2.4.0
 * translation-finder 1.6
 * Whoosh 2.7.4
 * defusedxml 0.6.0
 * Git 2.20.1
 * Pillow 5.4.1
 * python-dateutil 2.8.0
 * lxml 4.3.2
 * django-crispy-forms 1.7.2
 * django_compressor 2.3
 * djangorestframework 3.10.2
 * user-agents 2.0
 * jellyfish 0.7.2
 * diff-match-patch 20181111
 * ruamel.yaml 0.16.2
 * tesserocr 2.4.0
 * Mercurial 4.8.2
 * git-svn 2.20.1
 * Database backends: django.db.backends.postgresql
 * Cache backends: avatar:FileBasedCache, default:RedisCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: smtp
 * Celery: redis://cache:6379/1, redis://cache:6379/1, regular
 * Platform: Linux 4.14.128-112.105.amzn2.x86_64 (x86_64)


docker-compose exec --user weblate weblate 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.

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

System check identified 2 issues (1 silenced).

Metadata

Metadata

Assignees

Labels

bugSomething is broken.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions