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

Failed to compile template #42

Open
SpeedK opened this issue Jan 24, 2021 · 3 comments
Open

Failed to compile template #42

SpeedK opened this issue Jan 24, 2021 · 3 comments

Comments

@SpeedK
Copy link

SpeedK commented Jan 24, 2021

bug

This problem randomly appears during calls to i18n.t
Examples of where it happens

context.i18n.t('info')
context.i18n.t('welcome',{username:username})

What could be the problem?

@SamixGroup
Copy link

SamixGroup commented Apr 24, 2021

Recently I had the same problem because i had been trying to use compile template without putting correct templateData. You may be getting this error because user don't have an username

@SpeedK
Copy link
Author

SpeedK commented Apr 24, 2021

The weird thing is repeating the exact same command makes it work.

for example,

for i=0 to n:
try:
context.i18n.t('welcome',{username:username})

may give an error on i=0 but works perfectly on i >0

@ikerya
Copy link

ikerya commented Jan 31, 2023

same here. tried repeating with the same arguments — no error occured. quite strange behaviour

i console logged all the variables and it's all okay with them.

i think it's time to get rid of telegraf and move to grammy. bye-bye.

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

3 participants