sift icon indicating copy to clipboard operation
sift copied to clipboard

Jinja2 Markup error during SIFT CLI install

Open bhamdans opened this issue 2 years ago • 3 comments

[email protected]+0-g0582d2b sift-version: notinstalled

mode: server downloading v2022.01.22

downloading sift-saltstack-v2022.01.22.tar.gz.asc downloading sift-saltstack-v2022.01.22.tar.gz.sha256 downloading sift-saltstack-v2022.01.22.tar.gz.sha256.asc downloading sift-saltstack-v2022.01.22.tar.gz validating file sift-saltstack-v2022.01.22.tar.gz validating signature for sift-saltstack-v2022.01.22.tar.gz.sha256 extracting update sift-saltstack-v2022.01.22.tar.gz performing update v2022.01.22 Log file: /var/cache/sift/cli/v2022.01.22/saltstack.log

Update returned exit code not zero Error: Update returned exit code not zero at ChildProcess. (/snapshot/sift-cli/sift-cli.js:556:23) at ChildProcess.emit (events.js:400:28) at maybeClose (internal/child_process.js:1058:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)

From saltstack.log: -- snip -- File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 28, in from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes ImportError: cannot import name 'Markup' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/init.py)

bhamdans avatar Apr 18 '22 14:04 bhamdans

Hi @bhamdans This is caused by a change in Salt 3004 which upgrades the Jinja package. You can rectify this temporarily by running sudo python3 -m pip install jinja2==3.0.3 then running the command again.

I'll submit a PR later today which will fix this issue for the SIFT install.

digitalsleuth avatar Apr 18 '22 14:04 digitalsleuth

Testing now.

-=Dan=-

On Mon, Apr 18, 2022 at 9:54 AM Digital Sleuth @.***> wrote:

Hi @bhamdans https://github.com/bhamdans This is caused by a change in Salt 3004 which upgrades the Jinja package. You can rectify this temporarily by running sudo python3 -m pip install jinja2==3.0.3 then running the command again.

I'll submit a PR later today which will fix this issue for the SIFT install.

— Reply to this email directly, view it on GitHub https://github.com/teamdfir/sift/issues/559#issuecomment-1101470704, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZY74LJEW7DWS2O6HVGNSTVFVZQVANCNFSM5TV6AVQA . You are receiving this because you were mentioned.Message ID: @.***>

bhamdans avatar Apr 18 '22 15:04 bhamdans

Hi @bhamdans has this issue been resolved for you?

digitalsleuth avatar May 31 '22 02:05 digitalsleuth

Please also note, that once https://github.com/teamdfir/sift-saltstack/pull/80 is merged, SIFT CLI will be officially deprecated as of March 1, 2023, and is replaced with cast

ekristen avatar Feb 01 '23 23:02 ekristen