File "/Users/lance/Python projects/AlbiChatManager/functions.py", line 12, in GetUserByUsername
user = bot_func.invoke(ResolveUsername(username=username))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/sync.py", line 66, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/methods/advanced/invoke.py", line 79, in invoke
r = await self.session.invoke(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/session/session.py", line 361, in invoke
return await self.send(query, timeout=timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/session/session.py", line 301, in send
payload = await self.loop.run_in_executor(
RuntimeError: Task <Task pending name='Task-40' coro=<Invoke.invoke() running at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyrogram/methods/advanced/invoke.py:79> cb=[_run_until_complete_cb() at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:184]> got Future <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/futures.py:385]> attached to a different loop
"