Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
The most likely cause is that the destination file name contains an invalid character.
At least this is the only way I can get this error.
E.g.
import shutil<br></br><br></br>shutil.copyfile("I:/Temp/ro/test.txt", "I:/Temp/ro/test*1.txt")
On a Mac (or any *nix system) you'd get away with this, but not on Windows.
Further investigation reveals that the real problem is in the error checking of open_the_file in fileobject.c
The interpretation of the error number returned by Windows was corrected on April 8th 2002, in release 2.2.1
See -> Diff for change
I know the file name is valid--Poser would have barfed and died long before if it hadn't been. Thanks for the investigation, nruddock. I'm still not certain why some users have problems with this while others don't, or why this does not appear to be an issue for Poser 5 users (who also use Py 2.2). In any event, avoid shutil for P6 projects.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Avoid the shutil module when scripting for Poser 6. This module appears to be broken on a large number of installations.