Hi developers:

I am running LyX 1.5.0rc1 on Windows XP SP2. When I include an eps graph, LyX is not able to show it but displays the message "Error converting to loadable format"

I run lyxc.exe -dbg graphics and got the output below when including the graph.

Does anybody knows what is going on?

Thanks,
Fernando


Token: '\end_inset'
[readBB_from_PSFile] no(e)ps-format
[controller().bb_Changed set to true]
[controller().bb_Changed set to true]
[controller().bb_Changed set to true]
[controller().bb_Changed set to true]
[readBB_from_PSFile] no(e)ps-format
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
Recognised Fileformat: eps
Recognised Fileformat: eps
[readBB_from_PSFile] 39 24 480 523
[controller().bb_Changed set to true]
[controller().bb_Changed set to true]
[controller().bb_Changed set to true]
[controller().bb_Changed set to true]
Recognised Fileformat: eps
Recognised Fileformat: eps
[readBB_from_PSFile] 39 24 480 523
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[graphics::CacheItem::Impl::convertToDisplayFormat]
         Attempting to convert image file: C:/TEST/figure1.ps
         with displayed filename: C:\TEST\figure1.ps
Recognised Fileformat: eps

         The file contains eps format data.

The image loader can load the following directly:
bmp, pbm, pgm, png, ppm, xbm, xpm,
Of these, LyX recognises the following formats:
bmp, pbm, pgm, png, ppm, xbm, xpm

Unable to convert from eps to bmp
Unable to convert from eps to pbm
Unable to convert from eps to pgm
         Converting it to png format.
Error returned from iconv
EILSEQ An invalid multibyte sequence has been encountered in the input.
When converting from UTF-8 to UCS-4LE.
Input: 0x43 0x3a 0x2f 0x44 0x6f 0x63 0x75 0x6d 0x65 0x6e 0x74 0x73
0x20 0x61 0x6e 0x64 0x20 0x53 0x65 0x74 0x74 0x69 0x6e 0x67 0x73 0x2f
0x66 0x72 0x6f 0x69 0x67 0x2f 0x43 0x6f 0x6e 0x66 0x69 0x67 0x75 0x72
0x61 0xe7 0xf5 0x65 0x73 0x20 0x6c 0x6f 0x63 0x61 0x69 0x73 0x2f 0x54
0x65 0x6d 0x70 0x2f 0x6c 0x79 0x78 0x5f 0x74 0x6d 0x70 0x64 0x69 0x72
0x33 0x30 0x36 0x30 0x61 0x30 0x33 0x30 0x36 0x34
Converter c-tor:
         from_file:      C:/TEST/figure1.ps
         to_file_base: C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/CacheItem3060a03064
         from_format:  eps
         to_format:    png
build_script ... Error returned from iconv
EILSEQ An invalid multibyte sequence has been encountered in the input.
When converting from UTF-8 to UCS-4LE.
Input: 0x43 0x3a 0x2f 0x44 0x6f 0x63 0x75 0x6d 0x65 0x6e 0x74 0x73
0x20 0x61 0x6e 0x64 0x20 0x53 0x65 0x74 0x74 0x69 0x6e 0x67 0x73 0x2f
0x66 0x72 0x6f 0x69 0x67 0x2f 0x43 0x6f 0x6e 0x66 0x69 0x67 0x75 0x72
0x61 0xe7 0xf5 0x65 0x73 0x20 0x6c 0x6f 0x63 0x61 0x69 0x73 0x2f 0x54
0x65 0x6d 0x70 0x2f 0x6c 0x79 0x78 0x5f 0x74 0x6d 0x70 0x64 0x69 0x72
0x33 0x30 0x36 0x30 0x61 0x30 0x33 0x30 0x36 0x34
ready!
         Conversion script:
--------------------------------------
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil, sys, locale

def unlinkNoThrow(file):
   ''' remove a file, do not throw if an error occurs '''
   try:
     os.unlink(file)
   except:
     pass

def utf8ToDefaultEncoding(file):
   ''' if possible, convert to the default encoding '''
   try:
     language, output_encoding = locale.getdefaultlocale()
     if output_encoding == None:
       output_encoding = 'latin1'
     return unicode(file, 'utf8').encode(output_encoding)
   except:
     return file

infile = utf8ToDefaultEncoding("C:/TEST/figure1.ps")
outfile = "C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/gconvert03060a03064.ps"
shutil.copy(infile, outfile)
os.chdir("C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/")
infile = "C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/gconvert03060a03064.ps"
infile_base = "C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/gconvert03060a03064"
outfile = "C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/gconvert03060a03064.png"

if os.system(r'convert eps:' + '"' + infile + '"' + ' png:' + '"' +
outfile + '"
' + '') != 0:
   unlinkNoThrow(outfile)
   sys.exit(1)

if not os.path.isfile(outfile):
   if os.path.isfile(outfile + '.0'):
     os.rename(outfile + '.0', outfile)
     import glob
     for file in glob.glob(outfile + '.?'):
       unlinkNoThrow(file)
   else:
     sys.exit(1)

unlinkNoThrow(infile)

fromfile = outfile
tofile = "C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/CacheItem3060a03064.png"

try:
   os.rename(fromfile, tofile)
except:
   try:
     shutil.copy(fromfile, tofile)
   except:
     sys.exit(1)
   unlinkNoThrow(fromfile)

--------------------------------------
ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Traceback (most recent call last):
   File "C:/Documents and Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/lyxconvert0.py", line 24, in <module>
     shutil.copy(infile, outfile)
File "C:\Arquivos de programas\LyX15\python\lib\shutil.py", line 80, in copy
     copyfile(src, dst)
   File "C:\Arquivos de programas\LyX15\python\lib\shutil.py", line
47, in copyfile
     fdst = open(dst, 'wb')
IOError: [Errno 2] No such file or directory: 'C:/Documents and
Settings/froig/Configuracoes
locais/Temp/lyx_tmpdir3060a03064/gconvert03060a03064.
ps'
ForkedCallQueue: I'm going to sleep
Image conversion failed.
Unable to find converted file!





Reply via email to