shibdib / Firetail

An EVE Online Discord Bot (Continuation of Dramiel)
MIT License
23 stars 22 forks source link

Multiple errors after server crash #130

Closed MyUncleSam closed 5 years ago

MyUncleSam commented 6 years ago

Hi there,

today my server crashed and after a forced reboot the bot only says:

Mai 30 09:38:39 srv.domain.tld python3[9244]: [30/05/2018 09:38:39] INFO rss find_new_entries 80: Found 26 new entries for feed reddit
Mai 30 09:38:39 srv.domain.tld python3[9244]: [30/05/2018 09:38:39] INFO rss find_new_entries 80: Found 15 new entries for feed eveNews24
Mai 30 09:38:39 srv.domain.tld python3[9244]: [30/05/2018 09:38:39] INFO rss find_new_entries 80: Found 10 new entries for feed eveNews
Mai 30 09:38:39 srv.domain.tld python3[9244]: [30/05/2018 09:38:39] INFO rss find_new_entries 80: Found 10 new entries for feed imperium.news
Mai 30 09:38:39 srv.domain.tld python3[9244]: [30/05/2018 09:38:39] ERROR rss tick_loop 34: ERROR:
Mai 30 09:38:39 srv.domain.tld python3[9244]: Traceback (most recent call last):
Mai 30 09:38:39 srv.domain.tld python3[9244]:   File "/home/stefan/Firetail/firetail/extensions/rss/rss.py", line 32, in tick_loop
Mai 30 09:38:39 srv.domain.tld python3[9244]:     await self.send_and_record(sendable_entries)
Mai 30 09:38:39 srv.domain.tld python3[9244]:   File "/home/stefan/Firetail/firetail/extensions/rss/rss.py", line 116, in send_and_record
Mai 30 09:38:39 srv.domain.tld python3[9244]:     content, embed = self.format_message(feed['feed']['title'], entry)
Mai 30 09:38:39 srv.domain.tld python3[9244]:   File "/home/stefan/Firetail/firetail/extensions/rss/rss.py", line 87, in format_message
Mai 30 09:38:39 srv.domain.tld python3[9244]:     timestamp = datetime.strptime(entry['published'],
Mai 30 09:38:39 srv.domain.tld python3[9244]:   File "/usr/lib/python3/dist-packages/feedparser.py", line 383, in __getitem__
Mai 30 09:38:39 srv.domain.tld python3[9244]:     return dict.__getitem__(self, key)
Mai 30 09:38:39 srv.domain.tld python3[9244]: KeyError: 'published'
Mai 30 09:39:19 srv.domain.tld python3[9244]: [30/05/2018 09:39:19] ERROR killmails tick_loop 27: ERROR:
Mai 30 09:39:19 srv.domain.tld python3[9244]: Traceback (most recent call last):
Mai 30 09:39:19 srv.domain.tld python3[9244]:   File "/home/stefan/Firetail/firetail/extensions/killmails/killmails.py", line 22, in tick_loop
Mai 30 09:39:19 srv.domain.tld python3[9244]:     await self.process_data(data)
Mai 30 09:39:19 srv.domain.tld python3[9244]:   File "/home/stefan/Firetail/firetail/extensions/killmails/killmails.py", line 38, in process_data
Mai 30 09:39:19 srv.domain.tld python3[9244]:     constellation_id = data['constellation_id']
Mai 30 09:39:19 srv.domain.tld python3[9244]: KeyError: 'constellation_id'
Mai 30 09:38:39 srv.domain.tld python3[9244]: We're on!
Mai 30 09:38:39 srv.domain.tld python3[9244]: Version: 1.0.0a0
Mai 30 09:38:39 srv.domain.tld python3[9244]: Servers: 2
Mai 30 09:38:39 srv.domain.tld python3[9244]: Members: 14

Also found this error:

Mai 30 09:56:17 srv.domain.tld python3[10558]: AttributeError: 'User' object has no attribute 'guild_permissions'
Mai 30 09:56:17 srv.domain.tld python3[10558]: The above exception was the direct cause of the following exception:
Mai 30 09:56:17 srv.domain.tld python3[10558]: Traceback (most recent call last):
Mai 30 09:56:17 srv.domain.tld python3[10558]:   File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/bot.py", line 886, in invoke
Mai 30 09:56:17 srv.domain.tld python3[10558]:     yield from ctx.command.invoke(ctx)
Mai 30 09:56:17 srv.domain.tld python3[10558]:   File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 498, in invoke
Mai 30 09:56:17 srv.domain.tld python3[10558]:     yield from injected(*ctx.args, **ctx.kwargs)
Mai 30 09:56:17 srv.domain.tld python3[10558]:   File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 71, in wrapped
Mai 30 09:56:17 srv.domain.tld python3[10558]:     raise CommandInvokeError(e) from e
Mai 30 09:56:17 srv.domain.tld python3[10558]: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'User' object has no attribute 'guild_permissions'

Can anyone help me what to do? Maybe a cache or the datbase is corrupt now :-(

Already tried to move the firetail.sqlite file to let the bot recreate it - but nothing changed.

evidex commented 6 years ago

Looks like two (or three) separate issues. As to the RSS one, can you share your RSS config segment? It looks as though imperium.news wasn't correctly parsed, or had a bad format.

Does this persist after rebooting the bot?

MyUncleSam commented 6 years ago

The rss part is currently (I commented the one who seemed to not work):

# RSS Extension Settings
rss = {
    'channelId': 123123123,      # Default channel to which entries are sent
    'updateInterval': 15,    # Time in minutes to wait between checks for new RSS content
    'feeds': {
        'eveNews': {
            'uri': 'https://www.eveonline.com/rss/news',    # RSS feed URL
            'channelId': 234234234, # Channel to which feed should be sent. Override rss.channelId
        },
        #'imperium.news': {
        #    'uri': 'https://imperium.news/feed/'
        #},
        #'eveNews24': {
        #    'uri': 'http://evenews24.com/feed/'
        #},
        #'reddit': {
        #    'uri': 'https://www.reddit.com/r/Eve/.rss'
        #},
    },
}
evidex commented 6 years ago

Should be fixed by #131, just needs @shibdib 's +1