Invalid argument
Closed this issue · 8 comments
First fresh run:
gamma-launcher full-install --anomaly /media/axet/128GB/S.T.A.L.K.E.R.\ Anomaly --gamma /media/axet/128GB/GAMMA
[+] Installing mod: High Res Loading Screens
- Downloading HighResLoadingScreenV1.1.7z
- Using cached HighResLoadingScreenV1.1.7z
Traceback (most recent call last):
File "/media/axet/128GB/GAMMA/gamma-launcher/env/bin/gamma-launcher", line 33, in <module>
sys.exit(load_entry_point('launcher==0.1', 'console_scripts', 'gamma-launcher')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/cli.py", line 60, in main
args.cobject().run(args)
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/install.py", line 207, in run
self._install_mods()
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/install.py", line 169, in _install_mods
self._install_mod(k, v)
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/install.py", line 136, in _install_mod
extract_archive(file, dir)
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/archive.py", line 10, in extract_archive
{
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/archive.py", line 11, in <lambda>
'7z': lambda f, p: SevenZipFile(f).extractall(p),
^^^^^^^^^^^^^^^
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/py7zr/py7zr.py", line 399, in __init__
raise e
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/py7zr/py7zr.py", line 385, in __init__
self._real_get_contents(password)
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/py7zr/py7zr.py", line 418, in _real_get_contents
if not self._check_7zfile(self.fp):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/axet/128GB/GAMMA/gamma-launcher/env/lib/python3.11/site-packages/py7zr/py7zr.py", line 775, in _check_7zfile
fp.seek(-len(MAGIC_7Z), 1)
OSError: [Errno 22] Invalid argument
full:
Same error when I do rerun second time.
Looks like caused by zero length of './GAMMA/downloads/HighResLoadingScreenV1.1.7z'
$ 7z l ~/Downloads/GAMMA_addons_downloads.7z | grep HighRes
2021-11-11 00:46:09 ....A 109661648 downloads/HighResLoadingScreenV1.1.7z
Addons in the 7z archive, you probably had something failing while decompressing it.
As I mention above it has zero size.
Using check-md5 with option --redownload
will fix this cache issue
gamma-launcher check-md5 --gamma <path/to/gamma> --redownload
Simply removing the file does the trick.
I guess here are two issues: 1) zero file created and not removed after error 2) crashing trying to open zero file size instead of showing error / retry
Closing this issue since launcher is not responsible of download cache if archives are created/modified by an external resource.
Also, gamma-launcher check-md5 --update-cache --gamma <GAMMA dir>
should update the cache
It never been modified by external app. It was first clean run.