SyntaxError: invalid syntax - Snapper - Error when trying to update (anything)


Kernel: 6.5.8-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc
v: 13.2.1 clocksource: tsc available: acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=168ff78e-a1dd-455c-a233-ad853af5f177 rw
rootflags=subvol=@ quiet quiet rd.udev.log_priority=3
resume=UUID=c9d04578-bfb6-48ec-8bb1-cf1917b8c763 loglevel=3
Desktop: KDE Plasma v: 5.27.8 tk: Qt v: 5.15.11 wm: kwin_x11
vt: 2 dm: SDDM Distro: Garuda Linux base: Arch Linux
Type: Laptop System: LENOVO product: 21DA000WUS
v: ThinkPad T15p Gen 3 serial: <superuser required> Chassis:
type: 10 serial: <superuser required>
Mobo: LENOVO model: 21DA000WUS v: SDK0T76538 WIN
serial: <superuser required> UEFI: LENOVO v: N3EET34W (1.20 )
date: 09/27/2023
ID-1: BAT0 charge: 60.4 Wh (99.8%)
condition: 60.5/68.0 Wh (88.9%) volts: 12.7 min: 11.6
model: LGC 5B10W13960 type: Li-poly serial: <filter>
status: not charging cycles: 84
Info: model: 12th Gen Intel Core i7-12700H bits: 64
type: MST AMCP arch: Alder Lake gen: core 12 level: v3
note: check built: 2021+ process: Intel 7 (10nm ESF) family: 6
model-id: 0x9A (154) stepping: 3 microcode: 0x430
Topology: cpus: 1x cores: 14 mt: 6 tpc: 2 st: 8 threads: 20
smt: enabled cache: L1: 1.2 MiB desc: d-8x32 KiB, 6x48 KiB;
i-6x32 KiB, 8x64 KiB L2: 11.5 MiB desc: 6x1.2 MiB, 2x2 MiB
L3: 24 MiB desc: 1x24 MiB
Speed (MHz): avg: 691 high: 3500 min/max: 400/4600:4700:3500
scaling: driver: intel_pstate governor: powersave cores: 1: 400
2: 400 3: 400 4: 400 5: 1255 6: 400 7: 3500 8: 400 9: 400
10: 400 11: 1365 12: 400 13: 400 14: 400 15: 1312 16: 400
17: 400 18: 400 19: 400 20: 400 bogomips: 107520
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Vulnerabilities: <filter>
Device-1: Intel Alder Lake-P GT2 [Iris Xe Graphics]
vendor: Lenovo driver: i915 v: kernel arch: Gen-12.2
process: Intel 10nm built: 2021-22+ ports: active: eDP-1
empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0
chip-ID: 8086:46a6 class-ID: 0300
Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile]
vendor: Lenovo driver: nvidia v: 535.113.01
alternate: nouveau,nvidia_drm non-free: 535.xx+
status: current (as of 2023-09) arch: Ampere code: GAxxx
process: TSMC n7 (7nm) built: 2020-23 pcie: gen: 4
speed: 16 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0
chip-ID: 10de:25a2 class-ID: 0302
Device-3: Bison Integrated Camera driver: uvcvideo type: USB
rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-4:3
chip-ID: 5986:9106 class-ID: 0e02
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.2.1
compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
unloaded: nouveau alternate: fbdev,intel,nv,vesa dri: iris
gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1440x810 s-dpi: 96
s-size: 380x213mm (14.96x8.39") s-diag: 436mm (17.15")
Monitor-1: eDP-1 model: BOE Display 0x08e2 built: 2019
res: 1440x810 hz: 60 dpi: 106 gamma: 1.2
size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9
modes: 1920x1080
API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms:
device: 0 drv: nvidia device: 1 drv: iris device: 3 drv: swrast
surfaceless: drv: nvidia x11: drv: iris
inactive: gbm,wayland,device-2
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa
v: 23.2.1-arch1.2 glx-v: 1.4 direct-render: yes renderer: Mesa
Intel Graphics (ADL GT2) device-ID: 8086:46a6 memory: 30.33 GiB
unified: yes
API: Vulkan v: 1.3.264 layers: 4 device: 0 type: integrated-gpu
name: Intel Graphics (ADL GT2) driver: mesa intel
v: 23.2.1-arch1.2 device-ID: 8086:46a6 surfaces: xcb,xlib
device: 1 type: discrete-gpu name: NVIDIA GeForce RTX 3050
Laptop GPU driver: nvidia v: 535.113.01 device-ID: 10de:25a2
surfaces: xcb,xlib device: 2 type: cpu name: llvmpipe (LLVM
16.0.6 256 bits) driver: mesa llvmpipe v: 23.2.1-arch1.2 (LLVM
16.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Device-1: Intel Alder Lake PCH-P High Definition Audio
vendor: Lenovo driver: sof-audio-pci-intel-tgl
alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
chip-ID: 8086:51c8 class-ID: 0403
API: ALSA v: k6.5.8-zen1-1-zen status: kernel-api
tools: alsactl,alsamixer,amixer
Server-1: sndiod v: N/A status: off
tools: aucat,midicat,sndioctl
Server-2: PipeWire v: 0.3.83 status: active with:
1: pipewire-pulse status: active 2: wireplumber status: active
3: pipewire-alsa type: plugin 4: pw-jack type: plugin
tools: pactl,pw-cat,pw-cli,wpctl
Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi
v: kernel bus-ID: 00:14.3 chip-ID: 8086:51f0 class-ID: 0280
IF: wlp0s20f3 state: up mac: <filter>
Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e
v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:1a1f
class-ID: 0200
IF: enp0s31f6 state: down mac: <filter>
Device-1: Intel driver: btusb v: 0.8 type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-10:4
chip-ID: 8087:0033 class-ID: e001
Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter>
bt-v: 5.3 lmp-v: 12 status: discoverable: no pairing: no
class-ID: 7c010c
Local Storage: total: 953.87 GiB used: 289.29 GiB (30.3%)
SMART Message: Unable to run smartctl. Root privileges
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: KIOXIA model: N/A
size: 953.87 GiB block-size: physical: 512 B logical: 512 B
speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 1108ANLA temp: 33.9 C scheme: GPT
ID-1: / raw-size: 919.41 GiB size: 919.41 GiB (100.00%)
used: 289.27 GiB (31.5%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 21.8 MiB (7.3%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 919.41 GiB size: 919.41 GiB (100.00%)
used: 289.27 GiB (31.5%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
ID-4: /var/log raw-size: 919.41 GiB size: 919.41 GiB (100.00%)
used: 289.27 GiB (31.5%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
ID-5: /var/tmp raw-size: 919.41 GiB size: 919.41 GiB (100.00%)
used: 289.27 GiB (31.5%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
Kernel: swappiness: 133 (default 60)
cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 31.06 GiB used: 25.2 MiB (0.1%)
priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842
max-streams: 20 dev: /dev/zram0
ID-2: swap-2 type: partition size: 34.16 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
System Temperatures: cpu: 70.0 C mobo: N/A
Fan Speeds (rpm): fan-1: 2782
Processes: 435 Uptime: 2h 21m wakeups: 339 Memory: total: 32 GiB
note: est. available: 31.06 GiB used: 22.1 GiB (71.1%)
Init: systemd v: 254 default: graphical tool: systemctl
Compilers: gcc: 13.2.1 Packages: 1945 pm: pacman pkgs: 1863
libs: 456 tools: gnome-software,octopi,pamac,paru,yay pm: flatpak
pkgs: 82 Shell: fish v: 3.6.1 default: Bash v: 5.1.16
running-in: konsole inxi: 3.3.30
Garuda (2.6.17-1):
System install date:     2023-10-17
Last full system update: 2023-11-01
Is partially upgraded:   Yes
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       Probably (Run as root to verify)
Failed units:            packagekit.service

Hey Team,

I have been trying for the last 4 days to resolve an issue with my Garuda. I have no clue what the ades I did, but now on any install, update, removal, or head bang against my desk, I get the following message:

:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configuratio
File "/usr/share/libalpm/scripts/snap-pac", line 40
f"--config {config} create",
SyntaxError: invalid syntax
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

I have googled this error three ways from Sunday, and haven’t been able to find a resolution that works with my setup. I have updated the keyring, updated the keys in general, tried an OS refresh using pacman -Syu; nadda.

I found one thread pointing to a python module, but it’s not present in my system. I would be grateful for any insights you all may have.

Gracias Muchos


That presents a problem. How did it get that way? Is it a result of the updating error, or was it already existent?

Have you tried rolling back to the last successful boot?
Have you tried other kernels?


Should be this:

@filo — looks about right, but how does one switch, edit, or remove python without breaking things further?

I don’t know much about python but I know there are tools to do this. E.g. pyenv.

1 Like

Well, I couldn’t find the right module and wound up just nuking the install and starting over. Such as life. Thanks for the assist peoples!