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

Accessing project components view inside a category crashes #10464

Closed
2 tasks done
pleonex opened this issue Nov 22, 2023 · 2 comments
Closed
2 tasks done

Accessing project components view inside a category crashes #10464

pleonex opened this issue Nov 22, 2023 · 2 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@pleonex
Copy link
Contributor

pleonex commented Nov 22, 2023

Describe the issue

After upgrading 5.0.2 -> 5.1 -> 5.2, trying to view the component lists that are inside a category produces an internal server error.
The URL that crashes is like: https://<hostname>/projects/<project-name>/<category-name>/

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Go to your project, select "Components" tab
  2. In the list, click in one category
  3. Crash with the attached server logs.

weblate-log.txt

Expected behavior

It doesn't crash.

Screenshots

image

Exception traceback

Response:
weblate_1       | gunicorn stderr | {
weblate_1       | gunicorn stderr |   "err": 1,
weblate_1       | gunicorn stderr |   "message": "insufficient privileges: The access token is disabled."
weblate_1       | gunicorn stderr | }
weblate_1       | gunicorn stderr | ERROR:rollbar:Exception while posting item ApiError('insufficient privileges: The access token is disabled.')
weblate_1       | gunicorn stderr | Traceback (most recent call last):
weblate_1       | gunicorn stderr |   File "/usr/local/lib/python3.11/site-packages/rollbar/__init__.py", line 1492, in _send_payload
weblate_1       | gunicorn stderr |     _post_api('item/', payload_str, access_token=access_token)
weblate_1       | gunicorn stderr |   File "/usr/local/lib/python3.11/site-packages/rollbar/__init__.py", line 1561, in _post_api
weblate_1       | gunicorn stderr |     return _parse_response(path, SETTINGS['access_token'], payload_str, resp)
weblate_1       | gunicorn stderr |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
weblate_1       | gunicorn stderr |   File "/usr/local/lib/python3.11/site-packages/rollbar/__init__.py", line 1740, in _parse_response
weblate_1       | gunicorn stderr |     raise ApiError(json_data.get('message') or 'Unknown error')
weblate_1       | gunicorn stderr | rollbar.ApiError: insufficient privileges: The access token is disabled.
weblate_1       | gunicorn stderr | [2023-11-22 11:25:06,025: ERROR/246] Internal Server Error: /projects/pokemon-conquest/images/
weblate_1       | gunicorn stderr | Traceback (most recent call last):
weblate_1       | gunicorn stderr |   File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 880, in _resolve_lookup
weblate_1       | gunicorn stderr |     current = current[bit]
weblate_1       | gunicorn stderr |               ~~~~~~~^^^^^
weblate_1       | gunicorn stderr | TypeError: 'CategoryLanguageStats' object is not subscriptable

How do you run Weblate?

Docker container

Weblate versions

  • Weblate: 5.2
  • Django: 4.2.7
  • siphashc: 2.3
  • translate-toolkit: 3.11.1
  • lxml: 4.9.3
  • Pillow: 10.1.0
  • nh3: 0.2.14
  • python-dateutil: 2.8.2
  • social-auth-core: 4.5.0
  • social-auth-app-django: 5.4.0
  • django-crispy-forms: 2.1
  • oauthlib: 3.2.2
  • django-compressor: 4.4
  • djangorestframework: 3.14.0
  • django-filter: 23.3
  • django-appconf: 1.0.5
  • user-agents: 2.2.0
  • filelock: 3.13.1
  • rapidfuzz: 3.5.2
  • openpyxl: 3.1.2
  • celery: 5.3.5
  • django-celery-beat: 2.5.0
  • kombu: 5.3.4
  • translation-finder: 2.15
  • weblate-language-data: 2023.6
  • html2text: 2020.1.16
  • pycairo: 1.25.1
  • PyGObject: 3.46.0
  • diff-match-patch: 20230430
  • requests: 2.31.0
  • django-redis: 5.4.0
  • hiredis: 2.2.3
  • sentry-sdk: 1.35.0
  • Cython: 3.0.5
  • misaka: 2.1.1
  • GitPython: 3.1.40
  • borgbackup: 1.2.6
  • pyparsing: 3.1.1
  • ahocorasick_rs: 0.20.0
  • python-redis-lock: 4.0.0
  • charset-normalizer: 3.3.2
  • Python: 3.11.5
  • Git: 2.39.2
  • psycopg: 3.1.12
  • psycopg-binary: 3.1.12
  • phply: 1.2.6
  • ruamel.yaml: 0.18.5
  • tesserocr: 2.6.2
  • boto3: 1.29.2
  • zeep: 4.2.1
  • aeidon: 1.13
  • iniparse: 0.5
  • mysqlclient: 2.2.0
  • Mercurial: 6.5.3
  • git-svn: 2.39.2
  • git-review: 2.3.1
  • PostgreSQL server: 13.13
  • Database backends: django.db.backends.postgresql
  • PostgreSQL implementation: psycopg3 (binary)
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: smtp.sendgrid.net
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://cache:6379/1, redis://cache:6379/1, regular
  • Platform: Linux 4.18.0-522.el8.x86_64 (x86_64)

Weblate deploy checks

System check identified no issues.

Additional context

No response

@nijel nijel added the bug Something is broken. label Nov 22, 2023
@nijel nijel added this to the 5.2.1 milestone Nov 22, 2023
@nijel nijel self-assigned this Nov 22, 2023
@nijel
Copy link
Member

nijel commented Nov 22, 2023

Same root cause as #10460 and #10439

@nijel nijel closed this as completed Nov 22, 2023
Copy link

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, don’t hesitate to support Weblate by making a donation.

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