Mord3rca / gamma-launcher

Just another Launcher to setup S.T.A.L.K.E.R.: G.A.M.M.A.
GNU General Public License v3.0
84 stars 13 forks source link

No module named 'launcher.archive' #146

Closed LichHunter closed 2 months ago

LichHunter commented 2 months ago

Hi, I'm trying to do gamma-launcher full-install and get this error:

Traceback (most recent call last):
  File "/home/omen/Code/Python/gamma-launcher/.devenv/state/venv/bin/gamma-launcher", line 5, in <module>
    from launcher.cli import main
  File "/home/omen/Code/Python/gamma-launcher/.devenv/state/venv/lib/python3.11/site-packages/launcher/cli.py", line 2, in <module>
    from launcher.commands import (
  File "/home/omen/Code/Python/gamma-launcher/.devenv/state/venv/lib/python3.11/site-packages/launcher/commands/__init__.py", line 1, in <module>
    from .check import CheckAnomaly, CheckMD5
  File "/home/omen/Code/Python/gamma-launcher/.devenv/state/venv/lib/python3.11/site-packages/launcher/commands/check.py", line 10, in <module>
    from launcher.mods import read_mod_maker
  File "/home/omen/Code/Python/gamma-launcher/.devenv/state/venv/lib/python3.11/site-packages/launcher/mods/__init__.py", line 5, in <module>
    from launcher.archive import extract_archive
ModuleNotFoundError: No module named 'launcher.archive'

I've built package using instructions from readme:

python3 -m venv env
pip install .
gamma-launcher full-install --anomaly ~/stalker-gamma/drive_c/anomaly --gamma ~/Games/stalker-gamma/drive_c/gamma

I've found similar issue here and it was related to error in code - https://github.com/Mord3rca/gamma-launcher/issues/131

Thank you in advance

Mord3rca commented 2 months ago

Can you checkout on branch fix/archive_import, redo pip install and try again ? Thanks

LichHunter commented 2 months ago

Thank you for quick response I have checked and error related to 'launcher.archive' is fixed but now I get this error:

Traceback (most recent call last):
  File "/home/omen/Code/Python/gamma-launcher/env/bin/gamma-launcher", line 5, in <module>
    from launcher.cli import main
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/launcher/cli.py", line 2, in <module>
    from launcher.commands import (
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/launcher/commands/__init__.py", line 1, in <module>
    from .check import CheckAnomaly, CheckMD5
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/launcher/commands/check.py", line 10, in <module>
    from launcher.mods import read_mod_maker
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/launcher/mods/__init__.py", line 5, in <module>
    from launcher.mods.archive import extract_archive
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/launcher/mods/archive.py", line 5, in <module>
    from unrar.rarfile import RarFile
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/unrar/rarfile.py", line 26, in <module>
    from unrar import unrarlib
  File "/home/omen/Code/Python/gamma-launcher/env/lib/python3.12/site-packages/unrar/unrarlib.py", line 57, in <module>
    raise LookupError("Couldn't find path to unrar library.")
LookupError: Couldn't find path to unrar library.

I assume that I don't have necessary library but logs from pip install . shows that library was installed

Collecting unrar (from gamma-launcher==1.7)
  Downloading unrar-0.4-py3-none-any.whl.metadata (3.0 kB)

Is this related to path of python? For me it shows not like .../env/bin/python but full path to current directory

Thank you

Mord3rca commented 2 months ago

is unrar (the utility) installed on your distro ? What distro are you using btw ?

LichHunter commented 2 months ago

Well, I use NixOS but I assumed that python project would be more or less distro agnostic I also tried to build package in arch distrobox with same issue Lemme try to install unrar separately and see if this will help

LichHunter commented 2 months ago

Just tried in distrobox and nixos to install unrar and still same issue occured In nix path to unrar is non-topical but in distrobox it is as usual /usr/bin/unrar

Mord3rca commented 2 months ago

Can you try nix-shell -p python312Packages.unrardll on nixos ?

LichHunter commented 2 months ago

Still no luck but in any case I think we can close this ticket as current problem is not related to original issue I will continue trying to build it in nix though Huge thank you for quick response and fix