AXVin / AXVin-Cogs

Cogs for Red-DiscordBot v3 by AXVin
MIT License
7 stars 0 forks source link

Clock does not work #5

Closed DanasaurUK closed 3 years ago

DanasaurUK commented 3 years ago

I receive the error:

┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ c:\users\[user]\moasesbot-env\lib\site-packages\discord\ext\commands\core.py:85 in wrapped                          │
│ >   85             ret = await coro(*args, **kwargs)                                                                │
│ C:\Users\[user]\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\[redacted]\cogs\CogManager\cogs\clock\clock.py:97 in│
│ create                                                                                                              │
│ >  97                        ". It should be resolved on next cycle(5 minutes)")                                    │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
AXVin commented 3 years ago

Hey, that doesn't look like the full traceback. Can i get more info on this? Please check your logs

DanasaurUK commented 3 years ago

Sorry, that last post wasn't useful at all, here is the full traceback:

[11:20:30] ERROR    Exception in command 'clock create'                                                            [red]
           CRITICAL Caught unhandled exception in <Task finished name='Task-68682' coro=<Loop._loop() done,   [red.main]
                    defined at c:\users\dan\moasesbot-env\lib\site-packages\discord\ext\tasks\__init__.py:88>
                    exception=ValueError('Invalid format string')>:
                    Task exception was never retrieved
┌───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────┐
│ c:\users\dan\moasesbot-env\lib\site-packages\discord\ext\tasks\__init__.py:125 in _loop                              │
│ > 125             raise exc                                                                                          │
│ c:\users\dan\moasesbot-env\lib\site-packages\discord\ext\tasks\__init__.py:101 in _loop                              │
│ > 101                     await self.coro(*args, **kwargs)                                                           │
│ C:\Users\Dan\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\MoasesBot\cogs\CogManager\cogs\clock\clock.py:61 in    │
│ update_channels                                                                                                      │
│ >  61                                                                                                                │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ValueError: Invalid format string
┌───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────┐
│ c:\users\dan\moasesbot-env\lib\site-packages\discord\ext\commands\core.py:85 in wrapped                              │
│ >   85             ret = await coro(*args, **kwargs)                                                                 │
│ C:\Users\Dan\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\MoasesBot\cogs\CogManager\cogs\clock\clock.py:97 in    │
│ create                                                                                                               │
│ >  97                        ". It should be resolved on next cycle(5 minutes)")                                     │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
NameError: name 'tz' is not defined
AXVin commented 3 years ago

Thanks for reporting the error! I have fixed the issue. You can update the cog to see them!

DanasaurUK commented 3 years ago

I've now got a new error

Unhandled exception in internal background task 'update_channels'.
Traceback (most recent call last):
  File "c:\users\dan\moasesbot-env\lib\site-packages\discord\ext\tasks\__init__.py", line 101, in _loop
    await self.coro(*args, **kwargs)
  File "C:\Users\Dan\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\MoasesBot\cogs\CogManager\cogs\clock\clock.py", line 61, in update_channels
    time = time.strftime(fmt)
ValueError: Invalid format string
Unhandled exception in internal background task 'update_channels'.
Traceback (most recent call last):
  File "c:\users\dan\moasesbot-env\lib\site-packages\discord\ext\tasks\__init__.py", line 101, in _loop
    await self.coro(*args, **kwargs)
  File "C:\Users\Dan\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\MoasesBot\cogs\CogManager\cogs\clock\clock.py", line 61, in update_channels
    time = time.strftime(fmt)
ValueError: Invalid format string