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

[QUESTION] i have a problem with running lib and test #59

Open
XCisCoX opened this issue May 3, 2024 · 0 comments
Open

[QUESTION] i have a problem with running lib and test #59

XCisCoX opened this issue May 3, 2024 · 0 comments

Comments

@XCisCoX
Copy link

XCisCoX commented May 3, 2024

when ever i want to run test in new version of enkanetwork.py
it say something like that.

Exception has occurred: ValidationError
39 validation errors for EnkaNetworkResponse
playerInfo.showAvatarInfoList.0.avatarId
  Input should be a valid string [type=string_type, input_value=10000046, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.1.avatarId
  Input should be a valid string [type=string_type, input_value=10000030, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.2.avatarId
  Input should be a valid string [type=string_type, input_value=10000047, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.3.avatarId
  Input should be a valid string [type=string_type, input_value=10000073, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.4.avatarId
  Input should be a valid string [type=string_type, input_value=10000037, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.5.avatarId
  Input should be a valid string [type=string_type, input_value=10000065, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.6.avatarId
  Input should be a valid string [type=string_type, input_value=10000083, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.7.avatarId
  Input should be a valid string [type=string_type, input_value=10000092, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
avatarInfoList.0.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.9, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=2.7, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=2.7, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.4, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.3, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.9, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.6.nameTextMapHash
  Input should be a valid string [type=string_type, input_value=1225226258, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
  File "C:\Users\cisco\Desktop\enka.py-main\example\fetchuser.py", line 9, in main
    data = await client.fetch_user(843715177)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cisco\Desktop\enka.py-main\example\fetchuser.py", line 19, in <module>
    asyncio.run(main())
pydantic_core._pydantic_core.ValidationError: 39 validation errors for EnkaNetworkResponse
playerInfo.showAvatarInfoList.0.avatarId
  Input should be a valid string [type=string_type, input_value=10000046, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.1.avatarId
  Input should be a valid string [type=string_type, input_value=10000030, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.2.avatarId
  Input should be a valid string [type=string_type, input_value=10000047, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.3.avatarId
  Input should be a valid string [type=string_type, input_value=10000073, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.4.avatarId
  Input should be a valid string [type=string_type, input_value=10000037, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.5.avatarId
  Input should be a valid string [type=string_type, input_value=10000065, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.6.avatarId
  Input should be a valid string [type=string_type, input_value=10000083, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
playerInfo.showAvatarInfoList.7.avatarId
  Input should be a valid string [type=string_type, input_value=10000092, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
avatarInfoList.0.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.9, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.0.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=2.7, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.1.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.2.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=2.7, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.4, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.3, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.3.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.9, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=4.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.4.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=7.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.0.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.2, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.1.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.2.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=3.1, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.3.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=5.8, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.5.equipList.4.propValue
  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.5, input_type=float]
    For further information visit https://errors.pydantic.dev/2.6/v/int_from_float
avatarInfoList.6.nameTextMapHash
  Input should be a valid string [type=string_type, input_value=1225226258, input_type=int]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type

this is the code :

import asyncio

from enkanetwork import EnkaNetworkAPI

client = EnkaNetworkAPI()

async def main():
    async with client:
        data = await client.fetch_user(843715177)
        print("=== Player Info ===")
        print(f"Nickname: {data.player.nickname}")
        print(f"Level: {data.player.level}")
        print(f"Icon: {data.player.avatar.icon.url}")
        print(f"Signature: {data.player.signature}")
        print(f"Achievement: {data.player.achievement}")
        print(f"Abyss floor: {data.player.abyss_floor} - {data.player.abyss_room}")
        print(f"Cache timeout: {data.ttl}")

asyncio.run(main())
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

1 participant