Closed skorokithakis closed 2 months ago
Can you paste the full stack trace?
There's no traceback, unfortunately. This is the entire error.
By "Sentry" do you mean https://github.com/getsentry/sentry-python ?
Yes, I have their SDK installed, it seems to be catching some error incorrectly.
OK I'll see if I can find this in their SDK when I get time.
I stepped through the code, it seems to be something deep in the Django code that the distill command is triggering. I worked around it by just disabling Sentry locally (it's not like a static site needs it anyway), but this would at least be good to document in the Readme.
I'm guessing it's this:
https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/django/views.py#L82
Which isn't actually required in normal Django, but it'll need testing and some sort of mock None
that has an empty view_name
to keep Sentry happy.
Can you paste your urls.py
where you serve /
? And if used, your distill_func
?
It was this file, except with Distill:
https://github.com/skorokithakis/django-project-template/blob/master/main/urls.py
Basically, you can create a project with that template, add distill, and you'll see the error.
I don't appear to be able to trigger this. I've created a demo Sentry account, set up tests for it and it seems to work fine for me. I'll likely need a specific example to debug this further. It's likely because of how Sentry is attempting to wrapping Django views, however without a working example I can't confirm this.
Thank you for trying, I'll post back with an entire project if I manage to reproduce it (I removed Sentry and all is fine now).
I'll close this for now. If you discover more information about this issue feel free to comment back and I'll take a look.
Sentry seems to catch some exception that is otherwise fine, and generation fails with the following:
Disabling Sentry seems like it fixes things, but there's probably a better way to do this.