That's weird. Here's the problem: I'm using shutil.copy to copy the
files. It's calling chmod---because you are running on Linux, I think.
But you're copying to a FAT32 partition, so chmod is failing, and that's
what's giving the error.
Try the attached patch. And Bo, does this seem OK to you? I know you're
the python man....
rh
[EMAIL PROTECTED] wrote:
------- Additional Comments From [EMAIL PROTECTED] 2007-08-03 18:26 -------
In an error box appears
"Copying /tmp/.../name.html to /windows/.../name.html failed."
On the command line I can read:
Execute script `Seite1112.lg'
----------------------------
t4ht.c (2005-02-21-19:12 kpathsea)
t4ht -f/Seite1112.tex
-cvalidatehtml
(/usr/share/texmf/tex4ht/tex4ht.env)
Entering Seite1112.lg
System call: dvipng -q -mode ibmvga -D 110 -o Seite11120x.png -T tight -pp 2 -
bg 'Transparent' Seite1112.idv
sh: dvipng: command not found
--- Warning --- System return: 32512
System call: dvipng -q -mode ibmvga -D 110 -o Seite11121x.png -T tight -pp 3 -
bg 'Transparent' Seite1112.idv
sh: dvipng: command not found
--- Warning --- System return: 32512
Entering Seite1112.css
Entering Seite1112.tmp
Traceback (most recent call last):
File "/home/haase/Software/lyx-devel/lib/scripts/ext_copy.py", line 88, in ?
main(sys.argv)
File "/home/haase/Software/lyx-devel/lib/scripts/ext_copy.py", line 84, in
main
shutil.copy(from_file, to_file)
File "/usr/lib/python2.4/shutil.py", line 82, in copy
copymode(src, dst)
File "/usr/lib/python2.4/shutil.py", line 61, in copymode
os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: '/windows/D/EigeneDateien/Brueckle/
112/Seite1112.html.LyXconv/Seite1112.html'
Error: Die Datei konnte nicht kopiert werden
----------------------------------------
Das Kopieren von /tmp/lyx_tmpdir7041KVeRxj/lyx_tmpbuf0/Seite1112.html nach /
windows/D/EigeneDateien/Brueckle/112/Seite1112.html ist fehlgeschlagen.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Index: ext_copy.py
===================================================================
--- ext_copy.py (revision 19264)
+++ ext_copy.py (working copy)
@@ -81,7 +81,11 @@
continue #not found
from_file = os.path.join(from_dir, file)
to_file = os.path.join(to_dir, file)
- shutil.copy(from_file, to_file)
+ src = open(from_file, 'r')
+ dest = open(to_file, 'w')
+ shutil.copyfileobj(src, dest)
+ src.close()
+ dest.close()
return 0
if __name__ == "__main__":