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

[Linux] Some mods in manifest cause a crash. #25

Closed
TwigGlenn4 opened this issue Nov 23, 2022 · 17 comments
Closed

[Linux] Some mods in manifest cause a crash. #25

TwigGlenn4 opened this issue Nov 23, 2022 · 17 comments
Assignees
Labels
API Something to do with the API I am using bug Something isn't working Waiting All I can do is wait

Comments

@TwigGlenn4
Copy link

CMPDL v2.0.0, CLI interface

I'm downloading All The Mods 7 - To the Sky (modpack version 1.1.6) and some of the mods crash both the cli and gui versions.
My error is as follows

[19:36:32]-[INFO]: Downloading mod 30 out of 226
[19:36:32]-[INFO]: Mod name: Ex Nihilo: Sequentia
[19:36:32]-[INFO]: Mod url: https://www.curseforge.com/minecraft/mc-mods/ex-nihilo-sequentia
[19:36:32]-[INFO]: Mod author(s): (CurseAuthor(id=308637, name='NovaMachina', url='https://www.curseforge.com/members/100810788-novamachina?username=novamachina'),)
[19:36:32]-[INFO]: Mod is required
'NoneType' object has no attribute 'split'
Something went wrong, check the log for more info
If you think this is a bug, please report it on the GitHub page
https://github.com/Advik-B/CMPDL/issues/new
Traceback (most recent call last):
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cli.py", line 233, in <module>
    main()
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cmpdl/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cmpdl/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cmpdl/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cmpdl/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cli.py", line 227, in main
    raise e
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cli.py", line 221, in main
    m.install()
  File "/home/twigglenn4/Downloads/CMPDL-2.0.0/src/cli.py", line 135, in install
    mods_folder, unquote(file.download_url.split("/")[-1])
AttributeError: 'NoneType' object has no attribute 'split'

This occurred for Ex Nihilo: Sequentia and it's addons, so I think it might be related to the colon : in its title.

My current solution is to download the mod from the CurseForge website, copy the project ID from the website, find and remove that entry in the manifest.json, and run the program again.

Modpack .zip file link:
https://www.curseforge.com/minecraft/modpacks/all-the-mods-7-to-the-sky/download/4094716?client=n

@Advik-B
Copy link
Owner

Advik-B commented Nov 23, 2022

Wow, Will fix this by 25/11/2022

@Advik-B
Copy link
Owner

Advik-B commented Nov 23, 2022

My dude, the error is not on my end it is on cursepy's end.

@Advik-B
Copy link
Owner

Advik-B commented Nov 23, 2022

I've raised an issue at OwenCochell/cursepy#13

@Advik-B Advik-B self-assigned this Nov 23, 2022
@Advik-B Advik-B added bug Something isn't working API Something to do with the API I am using Waiting All I can do is wait and removed bug Something isn't working labels Nov 23, 2022
Repository owner deleted a comment from create-issue-branch bot Nov 23, 2022
@Advik-B
Copy link
Owner

Advik-B commented Nov 23, 2022

Btw, here is a simpler reproducible code example:

from cursepy import CurseClient
from v import api_key

c = CurseClient(api_key)
addon = c.addon(400012) # Ex Nihilo: Sequentia

for file in addon.files():
    print(file.download_url)

# The output will only be None

@TwigGlenn4
Copy link
Author

TwigGlenn4 commented Nov 23, 2022

Okay, there was another bug with a specific mod where the error actually showed their files, so I'll report that to them too.

@Advik-B
Copy link
Owner

Advik-B commented Nov 23, 2022

@TwigGlenn4 use v2.5.0 as it contains optimizations and a temp fix for this issue

Also read the release notes 😉

@TwigGlenn4
Copy link
Author

TwigGlenn4 commented Nov 23, 2022

This works great! My only suggestion would be to print a list of errored mods at the end so users know what they need to manually download without scrolling through all the output in a large modpack. Hostile Neural Networks (projectID 552574, fileID 4019567) still breaks somehow with the logo and needs to be manually removed, but that's a problem with cursepy and i've submitted an issue to them.

@Advik-B
Copy link
Owner

Advik-B commented Nov 24, 2022

Ok, will work on it, please keep this issue open

@Advik-B
Copy link
Owner

Advik-B commented Nov 24, 2022

This works great! My only suggestion would be to print a list of errored mods at the end so users know what they need to manually download without scrolling through all the output in a large modpack.
Hostile Neural Networks (projectID 552574, fileID 4019567) still breaks somehow with the logo and needs to be manually removed, but that's a problem with cursepy and i've submitted an issue to them.

Could you attach the logs please, I will try to look into it

@Advik-B
Copy link
Owner

Advik-B commented Nov 24, 2022

Nevermind I found it OwenCochell/cursepy#14
Will submit a patch by 25/11/2022

@ArcadeArchie
Copy link

@TwigGlenn4 as a temporary workaround while we wait for a patch, you can Download the Source.7z and change backend.py to use file.guess_download() its around line 198 and should look like this after the change.

if file.download_url is None:
    file.download_url = file.guess_download()
    #self.log(f"Mod is [b red]not downloadable[/] [b]{file.id}[/] [b]{mod.name}[/] due to API error")
    #self.log("See https://github.com/Advik-B/CMPDL/issues/25 for more info")
    continue

Also make sure in the requirements.txt the cursepy version is set to 2.2.0
i've tested it with ATM8 and so far it works

@Advik-B
Copy link
Owner

Advik-B commented Nov 26, 2022

@TwigGlenn4 as a temporary workaround while we wait for a patch, you can Download the Source.7z and change backend.py to use file.guess_download() its around line 198 and should look like this after the change.

if file.download_url is None:
    file.download_url = file.guess_download()
    #self.log(f"Mod is [b red]not downloadable[/] [b]{file.id}[/] [b]{mod.name}[/] due to API error")
    #self.log("See https://github.com/Advik-B/CMPDL/issues/25 for more info")
    continue

Also make sure in the requirements.txt the cursepy version is set to 2.2.0 i've tested it with ATM8 and so far it works

@ArcadeArchie, you could also use the ZipApp.zip

@ArcadeArchie
Copy link

Will do, when I get the chance.

@ArcadeArchie
Copy link

ArcadeArchie commented Nov 26, 2022

@Advik-B i've tested it with the ZipApp.zip and ATM7 to the Sky, and it does work somewhat

  • you need to delete the cursepy folder that ZipApp.zip ships with and pip install cursepy==2.2.0
  • and with ATM7 to the Sky not all mods are correctly downloaded even with guess_download() see screenshot

image

@Advik-B
Copy link
Owner

Advik-B commented Nov 27, 2022

Oh, will patch that later this month. (Because of my exams on monday)
Anyways, here is the sunday patch I promised 👉🏻 v2.5.5

@Advik-B Advik-B modified the milestone: Revamp it! Nov 27, 2022
@Advik-B Advik-B pinned this issue Nov 27, 2022
@Advik-B
Copy link
Owner

Advik-B commented Nov 28, 2022

@ArcadeArchie could you please create a new issue?

@Advik-B
Copy link
Owner

Advik-B commented Nov 28, 2022

Closing the issue in favor of the patch
Please create a new issue so that it will be easy for me to track down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Something to do with the API I am using bug Something isn't working Waiting All I can do is wait
Projects
None yet
Development

No branches or pull requests

3 participants