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

Unpickleable BoundTemplate.uptodate with FileSystemLoader #107

Closed
jg-rp opened this issue Feb 22, 2023 · 0 comments
Closed

Unpickleable BoundTemplate.uptodate with FileSystemLoader #107

jg-rp opened this issue Feb 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jg-rp
Copy link
Owner

jg-rp commented Feb 22, 2023

FileSystemLoader's use of lambdas for uptodate callbacks is causing loaded templates to be unpickleable.

AttributeError: Can't pickle local object 'FileSystemLoader.get_source.<locals>.<lambda>'

We can solve this using a simple function and functools.partial, instead of a lambda function.

@jg-rp jg-rp added the bug Something isn't working label Feb 22, 2023
@jg-rp jg-rp closed this as completed in fb27696 Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant