TypeError in RSSFeed.from_parsed_feed related to last_build_date #24

Open
opened 2024-08-26 18:57:09 +00:00 by corbz · 1 comment
Owner
ERROR Ignoring exception in command 'debug-trigger-task'

Traceback (most recent call last):

  File "/usr/local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 827, in _do_call

    return await self._callback(self.binding, interaction, **params)  # type: ignore

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/src/extensions/tasks.py", line 72, in debug_trigger_task

    await self.subscription_task()

  File "/usr/local/lib/python3.12/site-packages/discord/ext/tasks/__init__.py", line 368, in __call__

    return await self.coro(*args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/src/extensions/tasks.py", line 86, in subscription_task

    await self.execute_task()

  File "/app/src/extensions/tasks.py", line 100, in execute_task

    await self.process_subscriptions(subscriptions)

  File "/app/src/extensions/tasks.py", line 186, in process_subscriptions

    await asyncio.gather(*(semaphore_process(sub) for sub in subscriptions))

  File "/app/src/extensions/tasks.py", line 184, in semaphore_process

    await process_single_subscription(sub)

  File "/app/src/extensions/tasks.py", line 177, in process_single_subscription

    rss_feed = RSSFeed.from_parsed_feed(parsed_feed)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/src/feed.py", line 241, in from_parsed_feed

    last_build_date = datetime(*last_build_date[0:-2] if last_build_date else None)

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: datetime.datetime() argument after * must be an iterable, not NoneType

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "/usr/local/lib/python3.12/site-packages/discord/app_commands/tree.py", line 1248, in _call

    await command._invoke_with_namespace(interaction, namespace)

  File "/usr/local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 853, in _invoke_with_namespace

    return await self._do_call(interaction, transformed_values)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 842, in _do_call

    raise CommandInvokeError(self, e) from e

discord.app_commands.errors.CommandInvokeError: Command 'debug-trigger-task' raised an exception: TypeError: datetime.datetime() argument after * must be an iterable, not NoneType
``` ERROR Ignoring exception in command 'debug-trigger-task' Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 827, in _do_call return await self._callback(self.binding, interaction, **params) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/extensions/tasks.py", line 72, in debug_trigger_task await self.subscription_task() File "/usr/local/lib/python3.12/site-packages/discord/ext/tasks/__init__.py", line 368, in __call__ return await self.coro(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/extensions/tasks.py", line 86, in subscription_task await self.execute_task() File "/app/src/extensions/tasks.py", line 100, in execute_task await self.process_subscriptions(subscriptions) File "/app/src/extensions/tasks.py", line 186, in process_subscriptions await asyncio.gather(*(semaphore_process(sub) for sub in subscriptions)) File "/app/src/extensions/tasks.py", line 184, in semaphore_process await process_single_subscription(sub) File "/app/src/extensions/tasks.py", line 177, in process_single_subscription rss_feed = RSSFeed.from_parsed_feed(parsed_feed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/feed.py", line 241, in from_parsed_feed last_build_date = datetime(*last_build_date[0:-2] if last_build_date else None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: datetime.datetime() argument after * must be an iterable, not NoneType The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/discord/app_commands/tree.py", line 1248, in _call await command._invoke_with_namespace(interaction, namespace) File "/usr/local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 853, in _invoke_with_namespace return await self._do_call(interaction, transformed_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/discord/app_commands/commands.py", line 842, in _do_call raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command 'debug-trigger-task' raised an exception: TypeError: datetime.datetime() argument after * must be an iterable, not NoneType ```
corbz added the
bug
label 2024-08-26 18:57:09 +00:00
Author
Owner

I've traced it back to this rss feed I was using

https://steamcommunity.com/groups/freegamesfinders/rss/

I believe that the lack of a build date in the feed causes the error

I've traced it back to this rss feed I was using https://steamcommunity.com/groups/freegamesfinders/rss/ I believe that the lack of a build date in the feed causes the error
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: corbz/PYRSS-Bot#24
No description provided.