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

KeyError: 'title'[BUG 🐞] #3

Open
Staga-det opened this issue May 10, 2021 · 0 comments
Open

KeyError: 'title'[BUG 🐞] #3

Staga-det opened this issue May 10, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Staga-det
Copy link

Describe the bug
Once I run the code, a KeyError: 'title' appears

To Reproduce
Steps to reproduce the behavior:

  1. run pip install --upgrade telegram-rss
  2. properly edit the file at \telegram-rss\config.toml
  3. The following error appears:

C:\Users\loren>python -m telegram_rss update Traceback (most recent call last): File "C:\Users\loren\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\loren\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\__main__.py", line 6, in <module> main() File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\main.py", line 67, in main sys.exit(cli(obj=config)) # pylint: disable=E1123,E1120 File "C:\Users\loren\anaconda3\lib\site-packages\click\core.py", line 829, in __call__ return self.main(*args, **kwargs) File "C:\Users\loren\anaconda3\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "C:\Users\loren\anaconda3\lib\site-packages\click\core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\loren\anaconda3\lib\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Users\loren\anaconda3\lib\site-packages\click\core.py", line 610, in invoke return callback(*args, **kwargs) File "C:\Users\loren\anaconda3\lib\site-packages\click\decorators.py", line 21, in new_func return f(get_current_context(), *args, **kwargs) File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\main.py", line 48, in update send_update(bot=bot, config=ctx.obj) File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\telegram.py", line 70, in send_update entries = updater.get_new_entries() File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\feed\updater.py", line 31, in get_new_entries if not self.feed or self.feed == self.local_feed: File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\feed\updater.py", line 75, in feed self._feed = Feed.from_feedparser(raw_feed) File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\feed\feed.py", line 37, in from_feedparser return cls(channel=feed["channel"], items=feed["items"]) File "<attrs generated init telegram_rss.feed.feed.Feed>", line 7, in __init__ File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\feed\feed.py", line 16, in __attrs_post_init__ self.channel = Channel.from_dict(self.channel) File "C:\Users\loren\anaconda3\lib\site-packages\telegram_rss\feed\channel.py", line 25, in from_dict title=item["title"], File "C:\Users\loren\anaconda3\lib\site-packages\feedparser\util.py", line 113, in __getitem__ return dict.__getitem__(self, key) KeyError: 'title'

Expected behavior
Regular behaviour

Screenshots
Copypasted above the error message that appears

Desktop (please complete the following information):

  • Python Version 3.9
@Staga-det Staga-det added the bug Something isn't working label May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant