Logbot fails to make new folder when invited to new room #4

Closed
opened 2021-02-24 15:42:08 +01:00 by decentral1se · 2 comments
Owner

Maybe a permissions issue on the server? Not sure.

INFO     Joining xxx@xxx.xxx.xxx as invited
ERROR    Bot.group threw exception: [Errno 2] No such file or directory: '/var/www/logs/xxx/images'
Traceback (most recent call last):
  File "/srv/gitea/clones/bots/.venv/lib/python3.7/site-packages/xbotlib.py", line 645, in group_message
    self.group(message)
  File "logbot.py", line 131, in group
    media_post, media_type = download(self, message)
  File "logbot.py", line 55, in download
    os.mkdir(path)
FileNotFoundError: [Errno 2] No such file or directory: '/var/www/logs/xxx/images'
Maybe a permissions issue on the server? Not sure. ``` INFO Joining xxx@xxx.xxx.xxx as invited ERROR Bot.group threw exception: [Errno 2] No such file or directory: '/var/www/logs/xxx/images' Traceback (most recent call last): File "/srv/gitea/clones/bots/.venv/lib/python3.7/site-packages/xbotlib.py", line 645, in group_message self.group(message) File "logbot.py", line 131, in group media_post, media_type = download(self, message) File "logbot.py", line 55, in download os.mkdir(path) FileNotFoundError: [Errno 2] No such file or directory: '/var/www/logs/xxx/images' ```
Author
Owner

as a quick fix, you could make that folder for now

> as a quick fix, you could make that folder for now
Author
Owner

After creating the folder that was missing, I now get the following:

ERROR    Bot.group threw exception: 'xxx@xxx.xxx.xxx'
Traceback (most recent call last):
  File "/srv/gitea/clones/bots/.venv/lib/python3.7/site-packages/xbotlib.py", line 645, in group_message
    self.group(message)
  File "logbot.py", line 133, in group
    add_to_db(self, message, media_post=media_post)
  File "logbot.py", line 9, in add_to_db
    keys = [x for x in self.db[message.room]['messages'].keys()]
KeyError: 'xxx@xxx.xxx.xxx'
After creating the folder that was missing, I now get the following: ``` ERROR Bot.group threw exception: 'xxx@xxx.xxx.xxx' Traceback (most recent call last): File "/srv/gitea/clones/bots/.venv/lib/python3.7/site-packages/xbotlib.py", line 645, in group_message self.group(message) File "logbot.py", line 133, in group add_to_db(self, message, media_post=media_post) File "logbot.py", line 9, in add_to_db keys = [x for x in self.db[message.room]['messages'].keys()] KeyError: 'xxx@xxx.xxx.xxx' ```
decentral1se self-assigned this 2021-02-24 15:54:33 +01:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: varia/bots#4
No description provided.