[Python] Geometry Dash Python module use errors

Discussão em 'Python' iniciado por Stack, Março 21, 2025.

  1. Stack

    Stack Membro Participativo

    I recently installed the GD api. I tried one of the examples listed on the documentations on pypi, only to run into a lot of errors.

    This is the code from the docs that I ran:

    import gd

    client = gd.Client()

    DAILY = "new daily! {daily.name} by {daily.creator.name} (ID: {daily.id})"


    @client.event
    async def on_daily(daily: gd.Level) -> None:
    print(DAILY.format(daily=daily))


    client.listen_for_daily()

    client.create_controller().run()




    And here are the errors I encountered (I'm on macOS Monterey):

    Traceback (most recent call last):
    File "/Users/user/Desktop/GD/GDBrowserr-hmm/d(GDPY) copy.py", line 1, in <module>
    import gd
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/gd/__init__.py", line 11, in <module>
    from gd import (
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/gd/api/__init__.py", line 1, in <module>
    from gd.api.color_channels import (
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/gd/api/color_channels.py", line 7, in <module>
    from funcs.application import partial
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/funcs/__init__.py", line 12, in <module>
    from funcs.callers import caller, method_caller
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/funcs/callers.py", line 5, in <module>
    from typing_aliases import DynamicCallable, DynamicTuple, StringDict, Unary
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/typing_aliases/__init__.py", line 11, in <module>
    from typing_aliases.typing import (
    File "/Users/user/Library/Python/3.7/lib/python/site-packages/typing_aliases/typing.py", line 346, in <module>
    AsyncGenericPredicate = AsyncCallable[P, bool]
    File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py", line 254, in inner
    return func(*args, **kwds)
    File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py", line 635, in __getitem__
    _check_generic(self, params)
    File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py", line 208, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
    TypeError: Too many parameters for typing.Callable[[~P], typing.Awaitable[~R]]; actual 2, expected 1
    >>>

    Continue reading...

Compartilhe esta Página