Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>shutil.move()</code> will copy the source to destination and then remove the source if "a simple move" is not possible. This can happen when the source and the destination are not on the same filesystem for example.</p> <p>In this case, <code>shutil.move()</code> is doing just that: first it copies the source to the destination, and then does a <code>rmtree()</code> on the source.</p> <p>During the copy, <code>shutil</code> will copy the bytes of the source files and then copy "stat" information (permissions, modification times, etc.). So, it seems like <code>[Errno 22] Invalid argument</code> is either coming from copying the bytes, or copying the stat data. It seems very unlikely that copying bytes would cause <code>EINVAL</code> error, so the most likely explanation is that copying of "stat" data is causing this error.</p> <p>You can test this by adding something like this at the beginning of your main script:</p> <pre><code>import shutil import sys import traceback orig_copystat = shutil.copystat def my_copystat(src, dst): try: orig_copystat(src, dst) except Exception as e: sys.stdout.write('copystat failed: %s\n' % e) traceback.print_exc() shutil.copystat = my_copystat # Your script here... </code></pre> <p>If my guess is correct, you will see <code>copystat failed: ...</code> message(s) (and stack trace) when you run your script, but it should "work" otherwise. If you see the error message from the above function, you can change the above function to silently ignore the exception and run your script. Otherwise, try monkey-patching <code>shutil.copyfile</code> as above and see where exactly in <code>copyfile()</code> is the exception being raised.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload