aiotdlib icon indicating copy to clipboard operation
aiotdlib copied to clipboard

How use in windows?

Open t1622742583 opened this issue 3 years ago • 2 comments

my code:

async def main():
    client = Client(
        api_id=API_ID,
        api_hash=API_HASH,
        library_path='./lib',
        phone_number=PHONE_NUMBER
    )

    async with client:
        me = await client.api.get_me()
        logging.info(f"Successfully logged in as {me.json()}")
if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    asyncio.run(main())

error: FileNotFoundError: Could not find module 'D:\Desktop\tg_use_wls\lib' (or one of its dependencies). Try using the full path with constructor syntax.

t1622742583 avatar Sep 30 '22 03:09 t1622742583

You should provide path to tdlib binary, not to directory containing it. For example

client = Client(..., library_path="./lib/tdlib.dll")

pylakey avatar Oct 01 '22 22:10 pylakey

You should provide path to tdlib binary, not to directory containing it. For example

client = Client(..., library_path="./lib/tdlib.dll")

I don't have tdlib.dll at my td installer dir.

arynyklas avatar May 02 '23 13:05 arynyklas

You have to build a binary yourself. This library provides binaries only for MacOS and Linux.

Please follow build instructions for Windows by TDLib: https://tdlib.github.io/td/build.html?language=Python

pylakey avatar Jun 17 '24 18:06 pylakey