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

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

Open
tehelsper opened this issue Apr 11, 2022 · 2 comments
Open

Comments

@tehelsper
Copy link

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.
@Firu115
Copy link

Firu115 commented May 21, 2022

I'm having the same issue...

@scgbckbone
Copy link
Collaborator

thanks for pointing this out! Basically you just need to update dependencies, check this branch https://github.com/Coldcard/ckbunker/pull/19/files

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

No branches or pull requests

3 participants