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
91 stars 13 forks source link

ModDB connection error are not correctly handle #42

Closed axet closed 1 year ago

axet commented 1 year ago
Traceback (most recent call last):
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/tenacity/__init__.py", line 382, in __call__
[+] Updating G.A.M.M.A. definition
[+] Reading /media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/GAMMA/.Grok's Modpack Installer/G.A.M.M.A/modpack_data/modlist.txt & /media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/GAMMA/.Grok's Modpack Installer/G.A.M.M.A/modpack_data/modpack_maker_list.txt...
[+] Installing mod:  Dux Characters Kit Voices Pack
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/downloader/__init__.py", line 22, in download_mod
    file = Path(download_dir, e.filename)
                              ^^^^^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/downloader/moddb.py", line 22, in filename
    self._get_filename()
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/downloader/moddb.py", line 29, in _get_filename
    location = g_session.get(f"https://www.moddb.com{s[0]}", allow_redirects=False).headers["location"]
                                                     ~^^^
TypeError: 'NoneType' object is not subscriptable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/bin/gamma-launcher", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/cli.py", line 64, in main
    args.cobject().run(args)
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/install.py", line 206, in run
    self._install_mods()
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/install.py", line 168, in _install_mods
    self._install_mod(k, v)
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/install.py", line 129, in _install_mod
    file = download_mod(url, self._dl_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/tenacity/__init__.py", line 326, in iter
    raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f18db3f7190 state=finished raised TypeError>]
Mord3rca commented 1 year ago

Hello, Nothing to do with GAMMA update. It looks like ModDB did not respond correctly to the download request. Can you run a check-md5 and see if it's still an issue ?

Also, try to download a mod manually and see if you get a page like this: image

axet commented 1 year ago

Same error while checking. I can open the page.

Error: parsing failure for https://www.moddb.com/mods/stalker-anomaly/addons/quick-companion-teleport-151
WARNING: Skipping disable_burnt_fuzz.1.7z since ModDB info do not match download url
[+] Reading /media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/GAMMA/.Grok's Modpack Installer/G.A.M.M.A/modpack_data/modlist.txt & /media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/GAMMA/.Grok's Modpack Installer/G.A.M.M.A/modpack_data/modpack_maker_list.txt...
ERROR: parsing failure for https://www.moddb.com/mods/stalker-anomaly/addons/duxs-innumerable-character-kit-voices-pack
Traceback (most recent call last):
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/bin/gamma-launcher", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/cli.py", line 64, in main
    args.cobject().run(args)
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/tests.py", line 74, in run
    self._check_install_directives(mod)
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/commands/tests.py", line 32, in _check_install_directives
    archive = self.modpack_dl_dir / e.filename
                                    ^^^^^^^^^^
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/downloader/moddb.py", line 22, in filename
    self._get_filename()
  File "/media/axet/1TB/Games/S.T.A.L.K.E.R. GAMMA/gamma-launcher/env/lib/python3.11/site-packages/launcher/downloader/moddb.py", line 29, in _get_filename
    location = g_session.get(f"https://www.moddb.com{s[0]}", allow_redirects=False).headers["location"]
                                                     ~^^^
TypeError: 'NoneType' object is not subscriptable
Mord3rca commented 1 year ago

No error on my side for check-md5 & test-mod-maker ....

I'm connecting to this moddb node: 2606:4700:20::ac43:464e Put the following line in /etc/hosts and try again.

2606:4700:20::ac43:464e  www.moddb.com

Also, if you ran the launcher too many times, ModDB can restrict your access for ~2h (reason: botting)

axet commented 1 year ago
# dig AAAA www.moddb.com
www.moddb.com.      225 IN  AAAA    2a06:98c1:3123:e000::5
www.moddb.com.      160 IN  AAAA    2a06:98c1:3122:e000::5

I know ModDB can block IP. But I have multiply addresses and swap it. They do not block me. I have seen this error. Unfortunately gamma-launcher does not handle it correctly and showing parsing errors.

I guess better error handing can solve few unknown issues.

Beside that. Using your IP works check-md5 passing correctly as well as test-mod-maker