a1ex4 / ownfoil

Lightweight and customizable Tinfoil Shop manager, with automatic saves backup.
BSD 3-Clause "New" or "Revised" License
311 stars 32 forks source link

Save manager error #67

Closed ElOledor closed 7 months ago

ElOledor commented 8 months ago

Hi, I saw that a few weeks ago you upload a fix in save manager (https://github.com/a1ex4/ownfoil/pull/42) but for me is still failing. Thanks in advance!

2023-11-06 16:33:45,494 - INFO save_manager: Retrieving saves from from /JKSV to Saves
2023-11-06 16:33:46,193 - INFO gen_shop: Found 1352 directories, 724 game/save files
2023-11-06 16:33:46,242 - INFO gen_shop: Successfully wrote /games/shop.json
2023-11-06 16:33:46,261 - INFO gen_shop: Successfully wrote /games/shop.tfl
2023-11-06 16:33:46,261 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-11-06 16:38:45 CET)" executed successfully
2023-11-06 16:33:58,904 - ERROR apscheduler.executors.default: Job "Backup saves (trigger: interval[0:10:00], next run at: 2023-11-06 16:43:45 CET)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 201, in backup_saves
    r = switch_ftp.retrieve_saves(config['root_dir'] + '/' + folder['local'], folder['remote'])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 109, in retrieve_saves
    children = self.get_files(file)
               ^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 94, in get_files
    files = self.ftp.nlst(path)
            ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 553, in nlst
    self.retrlines(cmd, files.append)
  File "/usr/local/lib/python3.11/ftplib.py", line 461, in retrlines
    resp = self.sendcmd('TYPE A')
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 280, in sendcmd
    self.putcmd(cmd)
  File "/usr/local/lib/python3.11/ftplib.py", line 207, in putcmd
    self.putline(line)
  File "/usr/local/lib/python3.11/ftplib.py", line 202, in putline
    self.sock.sendall(line.encode(self.encoding))
    ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sendall'
a1ex4 commented 7 months ago

Could you try the develop tag of the image to see if it's fixed in the branch?

ElOledor commented 7 months ago

Fixed with develop branch, but I detected some problem with Just Dance, I deleted and perfect.

2023-11-15 23:28:09,981 - INFO save_manager: Successfully connected to Switch device on host 192.168.31.205.
2023-11-15 23:28:09,982 - INFO save_manager: Retrieving saves from from /JKSV to Saves
2023-11-15 23:28:10,053 - INFO gen_shop: Found 1357 directories, 806 game/save files
2023-11-15 23:28:10,074 - INFO gen_shop: Successfully wrote /games/shop.json
2023-11-15 23:28:10,084 - INFO gen_shop: Successfully wrote /games/shop.tfl
2023-11-15 23:28:10,085 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-11-15 23:33:09 CET)" executed successfully
2023-11-15 23:30:12,851 - INFO save_manager: Retrieved 176 saves in 122.869s - from /JKSV to Saves
2023-11-15 23:30:12,852 - INFO apscheduler.executors.default: Job "Backup saves (trigger: interval[0:10:00], next run at: 2023-11-15 23:38:09 CET)" executed successfully

I will try more, and let you know if I found why was failing. Thanks!

rursache commented 3 months ago

@a1ex4 Could you try the develop tag of the image to see if it's fixed in the branch?

can you make a latest release with it tho? its been broken for 6 months in the latest tag