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

Planet fix export #1372

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Planet fix export #1372

merged 2 commits into from
Nov 29, 2024

Conversation

chris34
Copy link
Member

@chris34 chris34 commented Nov 28, 2024

see commit messages

In commit f776101
the request was not passed as first argument to `render`.

Traceback in sentry was:

```
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'dict'
  File "django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "inyoka/planet/views.py", line 191, in export
    response = render('planet/%s.xml' % export_type, {'blogs': blogs},
  File "django/shortcuts.py", line 24, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "django/template/loader.py", line 61, in render_to_string
    template = get_template(template_name, using=using)
  File "django/template/loader.py", line 15, in get_template
    return engine.get_template(template_name)
  File "django/template/backends/django.py", line 33, in get_template
    return Template(self.engine.get_template(template_name), self)
  File "django/template/engine.py", line 175, in get_template
    template, origin = self.find_template(template_name)
  File "django/template/engine.py", line 157, in find_template
    template = loader.get_template(name, skip=skip)
  File "django/template/loaders/cached.py", line 57, in get_template
    template = super().get_template(template_name, skip)
  File "django/template/loaders/base.py", line 17, in get_template
    for origin in self.get_template_sources(template_name):
  File "django/template/loaders/cached.py", line 70, in get_template_sources
    yield from loader.get_template_sources(template_name)
  File "django/template/loaders/filesystem.py", line 35, in get_template_sources
    name = safe_join(template_dir, template_name)
  File "django/utils/_os.py", line 17, in safe_join
    final_path = abspath(join(base, *paths))
  File "<frozen posixpath>", line 90, in join
  File "<frozen genericpath>", line 164, in _check_arg_types
```
Before, it would raise an `AssertionError` and a server error.
@chris34 chris34 merged commit 1959112 into inyokaproject:staging Nov 29, 2024
21 checks passed
@chris34 chris34 deleted the planet-fix-export branch November 29, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant