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

[BUG] TypeError: BaseClient.search() takes from 2 to 3 positional arguments but 4 were given #11

Open
3Diller opened this issue Aug 26, 2022 · 2 comments
Assignees

Comments

@3Diller
Copy link

3Diller commented Aug 26, 2022

It seems like MinecraftWrapper.search_mods method passes MinecraftWrapper.MODS as an argument to BaseClass.search method but it doesn't expect that argument.

Code to reproduce:

from cursepy import MinecraftWrapper
from cursepy.classes.search import SearchParam

API_KEY = '***'

mw = MinecraftWrapper(API_KEY)
sp = SearchParam(gameId=mw.GAME, slug='invmove')
print(mw.search_mods(sp))

Traceback (most recent call last):

  File "/usr/local/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/me/Projects/minebot/minebot/curseforge.py", line 15, in <module>
    print(mw.search_mods(sp))
  File "/Users/me/Projects/minebot/.venv/lib/python3.10/site-packages/cursepy/wrapper.py", line 423, in search_mods
    return self.search(MinecraftWrapper.GAME_ID, MinecraftWrapper.MODS, search)
@3Diller
Copy link
Author

3Diller commented Aug 26, 2022

Also BaseClient.search and BaseClient.iter_search methods are missing category_id param described in their docstrings.

@OwenCochell
Copy link
Owner

I have corrected this issue on the newest release, the version you want is 2.1.0.

Thank you again for finding and reporting these bugs!

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