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

Markdown and Python3 #152

Open
XaTTa6bl4 opened this issue Jan 18, 2019 · 3 comments
Open

Markdown and Python3 #152

XaTTa6bl4 opened this issue Jan 18, 2019 · 3 comments
Assignees
Labels

Comments

@XaTTa6bl4
Copy link

With python2, markdown errors are processed and corrected as described in https://github.com/ableev/Zabbix-in-Telegram/wiki/Markdown-and-HTML
In log:

zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
zbxtg_group.py: Original message has been fixed due to https://github.com/ableev/Zabbix-in-Telegram/wiki/Markdown-and-HTML

but with python3 we can see cyclic error:

zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
zbxtg_group.py: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 85
...
@ableev
Copy link
Owner

ableev commented Mar 16, 2019

@XaTTa6bl4 are you using emojis? If yes - I probably can fix it. If not - please, provide input and output, not just errors.

@XaTTa6bl4
Copy link
Author

Yes, I'm using emojis. Example:

/usr/lib/zabbix/alertscripts/zbxtg_group.py 'TGroup' '{{OK}} RECOVER: *Unavailable by ICMP ping*, IP:10.0.23.101' '_SwitchName_12_ zbxtg;markdown'

ableev pushed a commit that referenced this issue Mar 16, 2019
@ableev ableev assigned ableev and unassigned XaTTa6bl4 Mar 16, 2019
@ableev
Copy link
Owner

ableev commented Mar 16, 2019

@XaTTa6bl4 thanks.
Let's hope that users won't be using more than one emoji.
Dirty hack applied.
Please, test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants