@
weakish #5
报错
>>> python3.6 -VV
Python 3.6.1 (default, Mar 22 2017, 06:17:05)
[GCC 6.3.0 20170321]
8660 ~/Downloads/fm163
>>> uname -srvpio
Linux 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 GNU/Linux
8661 ~/Downloads/fm163
>>> python3.6
fm163.py -D 455717860
Error encountered to access file /tmp/tmp7mzj5bzu
errno 18: Invalid cross-device link.
Traceback (most recent call last):
File "
fm163.py", line 365, in main
download(arguments.playlist_id, arguments.D, arguments.H)
File "
fm163.py", line 235, in download
save_meta(meta)
File "
fm163.py", line 172, in save_meta
json_dump(record, meta_db())
File "
fm163.py", line 108, in json_dump
serialize(thing, path, "w", serialize_with_json)
File "
fm163.py", line 97, in serialize
os.replace(temporary_file_path, path)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmp7mzj5bzu' -> '/home/f_nebula/.fm163/meta.json'
然后
--- /home/f_nebula/Downloads/fm163/
fm163.py~
+++ /home/f_nebula/Downloads/fm163/
fm163.py@@ -78,7 +78,7 @@
# temporary_file_handler: int = handler
# temporary_file_path: str = path
# temporary_file_handler, temporary_file_path = tempfile.mkstemp(dir=Path.cwd(), text=True)
- handler, p = tempfile.mkstemp(text=True)
+ handler, p = tempfile.mkstemp(dir=".", text=True)
temporary_file_handler: int = handler
temporary_file_path: str = p