5

client configuration windows 7 enterprise, Python 2.7.3

I try to launch from a W7 client a Python program located on a server, but I get the following message when 20 files (total size = 3GB) are copied from the client to the server :

Traceback (most recent call last):

File "\\filler\PROJECTS\server\python\LIB\util.py", line 101, in __pepareFiles
    shutil.copyfile(self.sFileIn,self.sTmpFileIn)

File "C:\Progra~1\Python27\lib\shutil.py", line 84, in copyfile
    copyfileobj(fsrc, fdst)

File "C:\Progra~1\Python27\lib\shutil.py", line 49, in copyfileobj
    buf = fsrc.read(length)

IOError: [Errno 22] Invalid argument

This message appears randomly when I copy the files.

Do you know if there is a solution to avoid this error message when the code to execute is located on a server in the same directory as the data?

I have found a solution: Execute all the Python code on the C: drive and no more from the server:

C:\PROJECTS\python\LIB\util.py

instead of

\\filler\PROJECTS\server\python\LIB\util.py

I do not get any errors now.

AndyG
  • 39,700
  • 8
  • 109
  • 143
PHC
  • 51
  • 1
  • 1
  • 3
  • Can you please clarify on which machine the script is, from which machine it is called and from where to where files are copied? Also have you tried to copy the files in the same setup with a shell command rather than a python script? –  Jan 02 '14 at 10:34
  • probably related: http://stackoverflow.com/questions/11955222/ioerror-22-in-python-invalid-on-windows or http://stackoverflow.com/questions/4226941/python-ioerror-errno-22-invalid-argument-when-using-cpickle-to-write-large. Check your filenames and mode. – alko Jan 02 '14 at 10:53

0 Answers0