For anyone confused by lishmael's post below here's a simplified explanation.
Open with Notepad++ and go to line 70 and change it from: request = urllib.request.Request("https://next.nexusmods.com/api/graphql", data=json_data, headers=headers)
I think I also got that same error until I realized I had to copy the address of the collection page, go to tools in MO2, select the Download Collection tool (iirc) and paste the address in the window that pops up. Did you do that?
That's a bit beyond me then. I dont write code or scripts, I was just able to make since of what was posted before and make it work for me. Sorry I cant be of much more help. The only thing I can suggest is just look over everything and make sure you did it correctly.
I have copied and pasted the collection directly from the collection page several times, but it still has not downloaded it. Help plz. Thank you in advance!! EDIT: Now I have enabled where I can progress past the initial screen, however when I am asked to choose the revision I have no option, and these error codes pop up "[2025-03-19 20:16:34.149 E] File "D:/Mods/Mod Organizer/plugins/NexusCollections.py", line 189, in next" "[2025-03-19 20:16:34.149 E] self.collectionRevision = int(self.revisionList.currentText().replace('Revision ', '').split(' (')[0])" "[2025-03-19 20:16:34.149 E] ValueError: invalid literal for int() with base 10: ''" "[2025-03-19 20:21:09.650 W] {'errors': [{'message': 'Game not found', 'locations': [{'line': 1, 'column': 67}], 'path': ['collection'], 'extensions': {'code': 'NOT_FOUND', 'detail': 'Game not found'}}], 'data': None}"
I'm having an issue with the plugin. When I try to download a collection, I paste the correct link into the plugin, but after clicking "Next," nothing happens. The window stays open, and the "Next" button remains clickable, but there’s no progress. I have premium, windows 11, and mo2.5.2. Thanks in advance EDIT: Not the correct link afterall, im stupid
Some issues with nexus api or nexusmods.com probabily, idk, but now it works. I used it yesterday and i remember that The mo2 log was something like: Line 189: invalid literal for int() with base 10 . Some data about the collection weren't found, then "None" was returned, so there was no revision number to select, therefore an empty string could not be parsed as an integer. The script is ok.
Made all the .py changes but when I get to where the download starts, I get "Failed to request file info from nexus; host requires authentication"
I'm using the Anvil modlist and running everything inside the virtual MO2 setup. Everything seems to work exactly like a normal installtion, file structure is same, .exe is set to handle nexus links, and using a premium account.
Edit, double check that you have authorized your MO2 installation on Nexus...
IMPORTANT: Use Game Folder Cleaner to make a clean Vanilla files list (you'll see what I mean when you use it), and use the software to remove ALL the non-vanilla files installed by Vortex prior to installing mods with MO2.
Install both Vortex and MO2, let Vortex handle downloads.
Set a custom path and folder to store Vortex downloads. Settings -> Downloads -> Downloads Folder.
Set the MO2 downloads folder to the folder you set for Vortex, so they share the same downloads folder.
Tools -> Settings -> Paths -> Downloads
In the MO2 downloads tab where you click to install, click Query Metadata after downloading the mods you want.
227 comments
Open with Notepad++ and go to line 70 and change it from:
request = urllib.request.Request("https://next.nexusmods.com/api/graphql", data=json_data, headers=headers)
to:
request = urllib.request.Request("https://api.nexusmods.com/v2/graphql", data=json_data, headers=headers)
Then go to line 224 and change it from:
pattern = r"next\.nexusmods\.com\/(.*?)\/collections\/(.*?)(?:\?.*)?$"
to:
pattern = r"nexusmods\.com\/games\/(.*?)\/collections\/(.*?)(?:\?.*)?$"
and save.
followd your instruction on changing those line of code
Thanks!
EDIT: Now I have enabled where I can progress past the initial screen, however when I am asked to choose the revision I have no option, and these error codes pop up "[2025-03-19 20:16:34.149 E] File "D:/Mods/Mod Organizer/plugins/NexusCollections.py", line 189, in next" "[2025-03-19 20:16:34.149 E] self.collectionRevision = int(self.revisionList.currentText().replace('Revision ', '').split(' (')[0])" "[2025-03-19 20:16:34.149 E] ValueError: invalid literal for int() with base 10: ''" "[2025-03-19 20:21:09.650 W] {'errors': [{'message': 'Game not found', 'locations': [{'line': 1, 'column': 67}], 'path': ['collection'], 'extensions': {'code': 'NOT_FOUND', 'detail': 'Game not found'}}], 'data': None}"
https://www.nexusmods.com/games/{GAME_NAME}/collections/{COLLECTION_ID}
and the API:
https://www.nexusmods.com/games/api/graphql
Thank you for making this!
I used it yesterday and i remember that The mo2 log was something like:
Line 189: invalid literal for int() with base 10
. Some data about the collection weren't found, then "None" was returned, so there was no revision number to select, therefore an empty string could not be parsed as an integer. The script is ok.authentication"
I'm using the Anvil modlist and running everything inside the virtual MO2 setup. Everything seems to work
exactly like a normal installtion, file structure is same, .exe is set
to handle nexus links, and using a premium account.
Edit, double check that you have authorized your MO2 installation on Nexus...
IMPORTANT: Use Game Folder Cleaner to make a clean Vanilla files list (you'll see what I mean when you use it), and use the software to remove ALL the non-vanilla files installed by Vortex prior to installing mods with MO2.