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

wagtail-localize crash when syncing MozFest homepage #8405

Closed
TheoChevalier opened this issue Mar 7, 2022 · 0 comments · Fixed by #8403
Closed

wagtail-localize crash when syncing MozFest homepage #8405

TheoChevalier opened this issue Mar 7, 2022 · 0 comments · Fixed by #8403

Comments

@TheoChevalier
Copy link
Contributor

TheoChevalier commented Mar 7, 2022

wagtail-localize crashes when trying to sync the MozFest homepage, because it contains a ListBlock nested in StructBlock.
This was fixed in wagtail/wagtail-localize#525, which has been included in 1.1rc2.

2022-03-07T09:03:05.989160+00:00 app[web.2]:   warnings.warn(

2022-03-07T09:03:06.045258+00:00 app[web.2]: Internal Server Error: /cms/localize/update/197/

2022-03-07T09:03:06.045260+00:00 app[web.2]: Traceback (most recent call last):

2022-03-07T09:03:06.045261+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner

2022-03-07T09:03:06.045262+00:00 app[web.2]:     response = get_response(request)

2022-03-07T09:03:06.045263+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response

2022-03-07T09:03:06.045263+00:00 app[web.2]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)

2022-03-07T09:03:06.045264+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback

2022-03-07T09:03:06.045265+00:00 app[web.2]:     return callback(request, *args, **kwargs)

2022-03-07T09:03:06.045265+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/contextlib.py", line 79, in inner

2022-03-07T09:03:06.045266+00:00 app[web.2]:     return func(*args, **kwds)

2022-03-07T09:03:06.045267+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func

2022-03-07T09:03:06.045267+00:00 app[web.2]:     response = view_func(request, *args, **kwargs)

2022-03-07T09:03:06.045268+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail/admin/urls/__init__.py", line 125, in wrapper

2022-03-07T09:03:06.045268+00:00 app[web.2]:     return view_func(request, *args, **kwargs)

2022-03-07T09:03:06.045268+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail/admin/auth.py", line 174, in decorated_view

2022-03-07T09:03:06.045269+00:00 app[web.2]:     response = view_func(request, *args, **kwargs)

2022-03-07T09:03:06.045269+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view

2022-03-07T09:03:06.045270+00:00 app[web.2]:     return self.dispatch(request, *args, **kwargs)

2022-03-07T09:03:06.045270+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/views/update_translations.py", line 161, in dispatch

2022-03-07T09:03:06.045270+00:00 app[web.2]:     return super().dispatch(request, *args, **kwargs)

2022-03-07T09:03:06.045271+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch

2022-03-07T09:03:06.045271+00:00 app[web.2]:     return handler(request, *args, **kwargs)

2022-03-07T09:03:06.045271+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/views/update_translations.py", line 115, in post

2022-03-07T09:03:06.045272+00:00 app[web.2]:     return self.form_valid(form)

2022-03-07T09:03:06.045272+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/contextlib.py", line 79, in inner

2022-03-07T09:03:06.045273+00:00 app[web.2]:     return func(*args, **kwds)

2022-03-07T09:03:06.045273+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/views/update_translations.py", line 122, in form_valid

2022-03-07T09:03:06.045274+00:00 app[web.2]:     self.object.update_from_db()

2022-03-07T09:03:06.045274+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/contextlib.py", line 79, in inner

2022-03-07T09:03:06.045274+00:00 app[web.2]:     return func(*args, **kwds)

2022-03-07T09:03:06.045275+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/models.py", line 468, in update_from_db

2022-03-07T09:03:06.045275+00:00 app[web.2]:     self.refresh_segments()

2022-03-07T09:03:06.045275+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/contextlib.py", line 79, in inner

2022-03-07T09:03:06.045276+00:00 app[web.2]:     return func(*args, **kwds)

2022-03-07T09:03:06.045276+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/models.py", line 546, in refresh_segments

2022-03-07T09:03:06.045276+00:00 app[web.2]:     for segment in extract_segments(instance):

2022-03-07T09:03:06.045277+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/segments/extract.py", line 205, in extract_segments

2022-03-07T09:03:06.045277+00:00 app[web.2]:     for segment in StreamFieldSegmentExtractor(

2022-03-07T09:03:06.045277+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/segments/extract.py", line 164, in handle_stream_block

2022-03-07T09:03:06.045278+00:00 app[web.2]:     for segment in self.handle_block(

2022-03-07T09:03:06.045278+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/segments/extract.py", line 97, in handle_block

2022-03-07T09:03:06.045279+00:00 app[web.2]:     return self.handle_struct_block(block_value)

2022-03-07T09:03:06.045279+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/segments/extract.py", line 131, in handle_struct_block

2022-03-07T09:03:06.045279+00:00 app[web.2]:     for segment in self.handle_block(block_type, block_value)

2022-03-07T09:03:06.045279+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/segments/extract.py", line 100, in handle_block

2022-03-07T09:03:06.045280+00:00 app[web.2]:     return self.handle_list_block(block_value, raw_value)

2022-03-07T09:03:06.045280+00:00 app[web.2]:   File "/app/.heroku/python/lib/python3.9/site-packages/wagtail_localize/segments/extract.py", line 145, in handle_list_block

2022-03-07T09:03:06.045280+00:00 app[web.2]:     raw_value["value"][0]

2022-03-07T09:03:06.045281+00:00 app[web.2]: TypeError: 'NoneType' object is not subscriptable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment