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

regex not working for KeywordReplaceFilter #147

Open
joukgal opened this issue Jan 20, 2025 · 0 comments
Open

regex not working for KeywordReplaceFilter #147

joukgal opened this issue Jan 20, 2025 · 0 comments

Comments

@joukgal
Copy link

joukgal commented Jan 20, 2025

hi, i want to ask, is regex not working for KeywordReplaceFilter ?

ERROR 2025-01-20 05:59:28,649 [mirroring.py:54]:telemirror: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/juk/telemirror/telemirror/mirroring.py", line 52, in wrapper return await fn(self, *args, **kw)
File "/home/juk/telemirror/telemirror/mirroring.py", line 125, in new_message
proceed, filtered_message = await config.filters.process( File "/home/juk/telemirror/telemirror/messagefilters/base.py", line 29, in process
return await self._process_message(entity, event_type) File "/home/juk/telemirror/telemirror/messagefilters/messagefilters.py", line 438, in _process_message
filtered_text = self._lookup_regex.sub(repl, filtered_text) File "/home/juk/telemirror/telemirror/messagefilters/messagefilters.py", line 417, in repl
replacement = utils.add_surrogate(self._keywords_mapping.get(group.lower()))
File "/home/juk/telemirror/venv/lib/python3.10/site-packages/telethon/helpers.py", line 40, in add_surrogate
return ''.join(
TypeError: 'NoneType' object is not iterable

thank you!

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

1 participant