You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to programming, so please take this into account
Traceback: Google_translator.py", line 6, in translator
text = await g.translate(f"{text}", locale)
File "C:\Python39\lib\site-packages\async_google_trans_new\main.py", line 241, in translate
await s.close()
TypeError: object NoneType can't be used in 'await' expression
code:
**
from aiogram.types.base import String
import async_google_trans_new
async def translator(text: String, locale: String):
g = async_google_trans_new.AsyncTranslator()
text = await g.translate(f"{text}", locale)
return text
**
I use a library function call from the asynchronous code of the telegram bot, need translation.
The text was updated successfully, but these errors were encountered:
I am new to programming, so please take this into account
Traceback:
Google_translator.py", line 6, in translator
text = await g.translate(f"{text}", locale)
File "C:\Python39\lib\site-packages\async_google_trans_new\main.py", line 241, in translate
await s.close()
TypeError: object NoneType can't be used in 'await' expression
code:
**
from aiogram.types.base import String
import async_google_trans_new
async def translator(text: String, locale: String):
g = async_google_trans_new.AsyncTranslator()
text = await g.translate(f"{text}", locale)
return text
**
I use a library function call from the asynchronous code of the telegram bot, need translation.
The text was updated successfully, but these errors were encountered: