Skip to content

Python Exception "module 'jinja2' has no attribute 'contextfunction'" #17

@tehelsper

Description

@tehelsper

A user is seeing this exception after installing CKBunker. Any ideas? Device is a Raspi 4.

Mar 31 06:54:55 myNode systemd[1]: ckbunker.service: Failed with result 'exit-code'.
Mar 31 06:54:55 myNode systemd[1]: ckbunker.service: Main process exited, code=exited, status=1/FAILURE
Mar 31 06:54:55 myNode ckbunker[1470]: AttributeError: module 'jinja2' has no attribute 'contextfunction'
Mar 31 06:54:55 myNode ckbunker[1470]:     @jinja2.contextfunction  # type: ignore
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/aiohttp_jinja2/helpers.py", line 12, in 
Mar 31 06:54:55 myNode ckbunker[1470]:     from .helpers import GLOBAL_HELPERS
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/aiohttp_jinja2/__init__.py", line 9, in 
Mar 31 06:54:55 myNode ckbunker[1470]:     import sys, os, asyncio, logging, aiohttp_jinja2, jinja2, time, weakref, re
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/webapp.py", line 5, in 
Mar 31 06:54:55 myNode ckbunker[1470]:     import webapp
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/main.py", line 110, in startup
Mar 31 06:54:55 myNode ckbunker[1470]:     return future.result()
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
Mar 31 06:54:55 myNode ckbunker[1470]:     return loop.run_until_complete(main)
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
Mar 31 06:54:55 myNode ckbunker[1470]:     asyncio.run(startup(False, local, config_file, psbt), debug=True)
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/main.py", line 68, in start_service
Mar 31 06:54:55 myNode ckbunker[1470]:     return __callback(*args, **kwargs)
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/click/core.py", line 760, in invoke
Mar 31 06:54:55 myNode ckbunker[1470]:     return ctx.invoke(self.callback, **ctx.params)
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
Mar 31 06:54:55 myNode ckbunker[1470]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
Mar 31 06:54:55 myNode ckbunker[1470]:     rv = self.invoke(ctx)
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/click/core.py", line 1055, in main
Mar 31 06:54:55 myNode ckbunker[1470]:     return self.main(*args, **kwargs)
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
Mar 31 06:54:55 myNode ckbunker[1470]:     sys.exit(load_entry_point('bunker', 'console_scripts', 'ck-bunker')())
Mar 31 06:54:55 myNode ckbunker[1470]:   File "/opt/mynode/ckbunker/env/bin/ck-bunker", line 33, in 
Mar 31 06:54:55 myNode ckbunker[1470]: Traceback (most recent call last):
Mar 31 06:54:54 myNode ckbunker[1470]: [31/03/2022-06:54:54] /mnt/hdd/mynode/ckbunker/bp-1850f665aa1e22c0.dat: not found (probably fine)
Mar 31 06:54:53 myNode systemd[1]: Started CKBunker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions