- os.rename(tmp.name, outfile)
Hi pi-cheng,
i have the following error when i run your script
doc/tune_json.py --run 1000 -f doc/examples/tutorial/example1.json Traceback (most recent call last): File "doc/tune_json.py", line 130, in <module> dump_json_file(doc, args.outfile) File "doc/tune_json.py", line 81, in dump_json_file os.rename(tmp.name, outfile) OSError: [Errno 18] Invalid cross-device link
Regards, Vincent
Hi Vincent,
I think the error comes from the complex of the paths of source and destination file. Using shutil.move should fix this. I'll resend again. Thanks for your testing.
Best Regards, Pi-Cheng