TISUnion / QuickBackupM

A backup / restore plugin, with multiple backup slots
GNU General Public License v3.0
148 stars 20 forks source link

'posix.DirEntry' object has no attribute 'encode' #37

Closed T-SandLand closed 4 months ago

T-SandLand commented 1 year ago

Sys:Debian12;MC:fabric1.16.5 ;Java:jdk-17 ;MCDR:2.7.2 ; Python:3.11.2 qb: M-1.7.0

log:

!!qb make 注释 [Server] [17:32:16] [Server thread/INFO]: Automatic saving is now disabled [Server] [17:32:16] [Server thread/INFO]: Saving the game (this may take a moment!) [Server] [17:32:16] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved [Server] [17:32:16] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [Server] [17:32:16] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [Server] [17:32:16] [Server thread/INFO]: Saved the game [MCDR] [17:32:16] [QBM - create/INFO] [quick_backup_multi]: Slot 1 (None) is deleted to provide spaces for the incoming backup [MCDR] [17:32:16] [QBM - create/INFO] [quick_backup_multi]: copying ./server/world -> ./qb_multi/slot1/world [MCDR] [17:32:16] [QBM - create/ERROR]: [QBM] Error creating backup Traceback (most recent call last): File "plugins/[备份]QuickBackupM-v1.7.0.mcdr/quick_backup_multi/init.py", line 304, in _create_backup copy_worlds(config.server_path, slot_path) File "plugins/[备份]QuickBackupM-v1.7.0.mcdr/quick_backup_multi/init.py", line 61, in copy_worlds shutil.copytree(src_path, dst_path, ignore=lambda path, files: set(filter(config.is_file_ignored, files))) File "/usr/lib/python3.11/shutil.py", line 561, in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/shutil.py", line 497, in _copytree copytree(srcobj, dstname, symlinks, ignore, copy_function, File "/usr/lib/python3.11/shutil.py", line 561, in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/shutil.py", line 497, in _copytree copytree(srcobj, dstname, symlinks, ignore, copy_function, File "/usr/lib/python3.11/shutil.py", line 561, in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/shutil.py", line 501, in _copytree copy_function(srcobj, dstname) File "/usr/lib/python3.11/shutil.py", line 436, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/t_sandland/.local/lib/python3.11/site-packages/speedcopy/init.py", line 183, in copyfile fs_src_type = FilesystemInfo().filesystem(src.encode('utf-8')) ^^^^^^^^^^ AttributeError: 'posix.DirEntry' object has no attribute 'encode' [Server] [17:32:16] [Server thread/INFO]: Automatic saving is now enabled

求助. . . .

Fallen-Breath commented 1 year ago

注意到堆栈追踪中包含 python3.11/site-packages/speedcopy 信息。speedcopy 这个 python 包并非 MCDR / QBM 所依赖的,请检查 python 环境是否被污染

Fallen-Breath commented 1 year ago

可以排查下: