ŠšŠ°Šŗ рŠµŃˆŠøть эту Š¾ŃˆŠøŠ±Šŗу? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

ŠšŠ°Šŗ рŠµŃˆŠøть эту Š¾ŃˆŠøŠ±Šŗу?

/storage/emulated/0 $ python test.py File "/storage/emulated/0/test.py", line 4 TOKEN= ''5265488332:AAFd-Ga-ZJECYFuv0WfVspWyJ4593O8wekk"" ^ SyntaxError: invalid syntax /storage/emulated/0 $ Š­Ń‚Š¾ Š¼Š½Šµ Š²Ń‹Š“Š°Ń‘Ń‚ pydroid 3 ŠæрŠø Š½Š°Š¶Š°Ń‚ŠøŠµ Š½Š° ŠŗŠ½Š¾ŠæŠŗу "Terminal" (Š”Š¾Š·Š“Š°ŃŽ тŠµŠ»ŠµŠ³Ń€Š°Š¼Š¼-Š±Š¾Ń‚Š°)

25th Mar 2022, 10:48 AM
Roman Osipov
Roman Osipov - avatar
7 Respostas
+ 1
Do you speak english? There seems to be a syntax error. In test.py there shouldn't be a second double quote in the end: TOKEN="52654...8wekk"āž”ļø"ā¬…ļø ā— Maybe removing the extra double quote it will solve the problem: TOKEN="5265488332:AAFd-Ga-ZJECYFuv0WfVspWyJ4593O8wekk" āœ”ļø
25th Mar 2022, 4:18 PM
Seb TheS
Seb TheS - avatar
+ 1
I guess you have to replace the quotes with == operator: if __name__ == '__#ain__':
29th Mar 2022, 1:36 PM
Seb TheS
Seb TheS - avatar
0
Here is the whole code: from aiogram import Bot, types from aiogram.dispatcher import Dispatcher from aiogram.utils import executor TOKEN="5265488332:AAFd-Ga-ZJECYFuv0WfVspWyJ4593O8wekk" bot =Bot(token=TOKEN) dp=Dispatcher(bot) @dp.message_handler (conten_types=['text']) async def telegram (msg: type.Message): await msg.answer(msg.text.lower()) if __name__"" '__#ain__': executor.start_polling(dp) as you can see, everything is fine with the signs, there are no repetitions " What to do?
26th Mar 2022, 4:01 AM
Roman Osipov
Roman Osipov - avatar
0
There is a weird pair of double quotes in: if __name__āž”ļø""ā¬…ļø '__#ain__':
26th Mar 2022, 10:15 AM
Seb TheS
Seb TheS - avatar
0
I copied the code from one video, there were these quotes and everything worked... What should I do with them?
29th Mar 2022, 9:01 AM
Roman Osipov
Roman Osipov - avatar
0
Yes, thank ...but it is written that the error is in line 4, quotes, but everything is fine with them
29th Mar 2022, 5:20 PM
Roman Osipov
Roman Osipov - avatar
0
Roman Osipov I don't really understand why it says the error would be on line 4, to me line 4 looks fine. Did fixing line 10 fix the problem?
30th Mar 2022, 12:10 PM
Seb TheS
Seb TheS - avatar