Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong url for forge download #41

Closed
herrlockskun opened this issue Nov 25, 2023 · 2 comments
Closed

Wrong url for forge download #41

herrlockskun opened this issue Nov 25, 2023 · 2 comments

Comments

@herrlockskun
Copy link

[OS]
Ubuntu 22.04

Minecraft install via snap

I had an issue with the version 2.4 of  GT new horizons
The link to download forge was worng

reating .minecraft directory
Creating symlinks
Installing modloader
Updating user launcher profiles
Downloading https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.4.1614/forge-1.7.10-10.13.4.1614-installer.jar
Got 404 error trying to download Forge
Downloading https://adfoc.us/serve/sitelinks/?id=271228&url=https://maven.minecraftforge.net/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar
Traceback (most recent call last):
  File "/home/herrlockckun/modpack-installer/install.py", line 393, in <module>
    main(
  File "/home/herrlockckun/modpack-installer/install.py", line 243, in main
    modloaders[modloader].main(manifest, mcver, mlver, packname, user_mcdir, manual)
  File "/home/herrlockckun/modpack-installer/forge_install.py", line 46, in main
    resp = download(url, outpath, True)
  File "/home/herrlockckun/modpack-installer/util.py", line 33, in download
    size = int(r.headers['Content-Length'])
  File "/usr/lib/python3/dist-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

the format of the url appear to be mcver + mlver + mcver and not mcver + mlver.
So i changed line 33 of forge_install.py from
forge_fullver = mcver + '-' + mlver to forge_fullver = mcver + '-' + mlver + '-' + mcver
And this work for me.

@cdbbnnyCode
Copy link
Owner

If I remember right, the format is not consistent across different versions of Forge. I can check if that's what's happening. In any case, the fallback option should not be trying to use an adfocus link.

@cdbbnnyCode
Copy link
Owner

I have not fully tested it, but this should be resolved in f6aa4ea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants