OwenCochell / cursepy

A CurseForge API written in python
MIT License
7 stars 1 forks source link

cusepy is showing an error (why? i dont know) #2

Closed Advik-B closed 2 years ago

Advik-B commented 2 years ago

The full traceback:

[16:2:15]-[INFO]: Downloading Just Enough Resources (JER)
[16:2:16]-[DEBUG]: Mod ProjectID: 240630
[16:2:18]-[DEBUG]: Mod FileID: 3562195
Traceback (most recent call last):
  File "e:\GitHub-Repos\CMPDL\src\index.py", line 102, in <module>
    test()
  File "e:\GitHub-Repos\CMPDL\src\index.py", line 97, in test
    modpack.download_mods('E:\GitHub-Repos\CMPDL\src\downloads')
  File "e:\GitHub-Repos\CMPDL\src\index.py", line 66, in download_mods
    self.download_raw(self.current_mod.file(mod["fileID"]).download_url, output_dir)
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\classes\base.py", line 684, in file
    return self.hands.addon_file(self.id, file_id)
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\wrapper.py", line 282, in addon_file
    return self.handle(9, addon_id, file_id)
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\handlers\base.py", line 987, in handle
    inst = hand.handle(*args, **kwargs)
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\handlers\base.py", line 408, in handle
    return super().handle()
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\handlers\base.py", line 190, in handle
    data = self.format(raw_data)
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\handlers\forgesvc.py", line 527, in format
    return self.low_format(data, id)
  File "E:\GitHub-Repos\CMPDL\src\venv\lib\site-packages\cursepy\handlers\forgesvc.py", line 554, in low_format       
    final.append(depen('addonId'))
TypeError: 'dict' object is not callable
Advik-B commented 2 years ago

without this library, I cant continue my project (Legally)

Advik-B commented 2 years ago

without this library, I cant continue my project (Legally)

when I say legally I mean without violating their policy

OwenCochell commented 2 years ago

Hello. I apologize for the response delay, I should be more available from this point on.

Anyway, I believe I have fixed this issue in my latest commit. If you installed cursepy via pip, then a package upgrade should fix the problem, the specific version you want is 1.1.2. The issue was rather simple, cursepy was not accessing a dictionary correctly. If something else comes up or this solution does not work on your end, then let me know, I would be more than happy to work with you to get cursepy working!

Also, as of now cursepy is against the curseforge policy. It taps into their back end API that is not meant for us. If that is a problem for you morally then cursepy might not be the solution for you. However, if this project gets popular enough, then I would like to reach out to CF to see if we can find a solution that satisfies their demands. Again, this probably won't happen unless this project gets super popular.

Once more, I apologize for the response delay. If you decide to use cursepy in your project and you encounter any more bugs or have any thoughts about improving cursepy, then I would love to hear about them. I'll close this issue once it's confirmed the problem is fixed.

Thanks!

Advik-B commented 2 years ago

Thank you Owen. I normally don't work on networking (I think you used networking in this project) that often. You are a genius.