Skip to content

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

@3Diller

Description

@3Diller

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions