Strange behavior when you name wp with the "k" as a last letter. You shouldn't use str.rstrip, and perhaps it is better not to use str.removesuffix because it is new.
>>> filename = 'vsmolnik.gpkg'
>>> filename.rstrip(".gpkg")
'vsmolni'
>>> filename.rsplit(".gpkg")[0]
'vsmolnik'
[root@euprogis mergin]# ./test-mergin-wp.sh
Downloading master project dracic/wp-testing...
Done.
Reading configuration from /tmp/mergin-work-packages-incj6trx/master/mergin-work-packages.yml
Master project files to copy to new projects: ['wp-testing.qgz', 'input-tk25.gpkg']
Preparing work package vsmolnik
Downloading work package project dracic/wp-testing-vsmolnik...
Done.
Preparing work package trojbukve
Downloading work package project dracic/wp-testing-trojbukve...
Done.
Preparing work package rbilo
Downloading work package project dracic/wp-testing-rbilo...
Done.
Preparing work package duliba
Downloading work package project dracic/wp-testing-duliba...
Done.
Preparing work package vucjak
Downloading work package project dracic/wp-testing-vucjak...
Done.
Preparing work package vgreda
Downloading work package project dracic/wp-testing-vgreda...
Done.
Preparing work package cdraga
Downloading work package project dracic/wp-testing-cdraga...
Done.
existing WPs: ['vsmolni', 'trojbukve', 'rbilo', 'duliba', 'vucja', 'vgreda', 'cdraga']
WP vsmolni
Traceback (most recent call last):
File "wp_mergin.py", line 149, in <module>
make_work_packages(wp_alg_dir, wp_config)
File "/opt/mergin/mergin-work-packages/wp.py", line 192, in make_work_packages
shutil.copy(wp_gpkg_base_wp_fids, wp_gpkg_base)
File "/usr/lib64/python3.6/shutil.py", line 245, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib64/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/mergin-work-packages-incj6trx/wp/base/vsmolni.gpkg'
Strange behavior when you name wp with the "k" as a last letter. You shouldn't use str.rstrip, and perhaps it is better not to use str.removesuffix because it is new.