Hello,
I am sure it is something on my side (as nobody else complained about
this so far), but I cannot figure out where the problem is.
I fairly recently made a new install on an Intel-based Apple using a
standard install of MacTeX-20070520.dmg, and I also updated to LyX 1.5.1.
However, EPS files do not show up in LyX anymore (Error converting to
loadable format). They are fine in the Latex output.
Removing the LyX-1.5 directory in ~/Library/Application Support (so that
a new configuration is created) does not change anything.
Below the console output, the convert-version, and the (longish) debug
output from "lyx -dbg graphics"
Basically, LyX uses convertDefault.py which complains about:
> Unknown device: pam
> Unrecoverable error: undefined in .uninstallpagedevice
> Operand stack:
> defaultdevice
Any ideas what this could mean?
Thanks,
/Konrad
The console.log says:
Unknown device: pam
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
Unknown device: pam
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
convert: Postscript delegate failed
`/tmp/lyx_tmpdir162527NVBpw/gconvert016252uLFDGv.eps'.
convert: missing an image filename
`ppm:/tmp/lyx_tmpdir162527NVBpw/CacheItem162525Nr3Vk.ppm'.
/Applications/TeX/LyX.app/Contents/Resources/scripts/convertDefault.py ERROR
Execution of "convert" failed.
The convert version:
khofbaue-al:~ khofbaue$ which convert
/usr/local/bin/convert
khofbaue-al:~ khofbaue$ convert --version
Version: ImageMagick 6.3.3 03/06/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC
Starting Lyx with -dbg graphics
khofbaue-al:~ khofbaue$ /Applications/TeX/LyX.app/Contents/MacOS/lyx
-dbg graphics
Setting debug level to graphics
Debugging `graphics' (Graphics conversion and loading)
LoaderQueue: priority set to 10 images at a time, 100 milliseconds
between calls
filetools(getFormatFromContents)
Couldn't find a known format!
Recognised Fileformat: agr
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
Recognised Fileformat: pdf
Recognised Fileformat: pdf
Recognised Fileformat: jpg
Recognised Fileformat: jpg
Recognised Fileformat: jpg
Recognised Fileformat: jpg
Recognised Fileformat: jpg
Recognised Fileformat: pdf
Recognised Fileformat: eps
Recognised Fileformat: eps
Recognised Fileformat: eps
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
File type not recognised before EOF!
filetools(getFormatFromContents)
Couldn't find a known format!
filetools(getFormatFromContents)
Couldn't find a known format!
Token: 'filename'
Token: 'width'
Token: 'keepAspectRatio'
Token: '\end_inset'
Token: 'filename'
Token: 'lyxscale'
Token: 'width'
Token: 'keepAspectRatio'
Token: '\end_inset'
Token: 'filename'
Token: 'width'
Token: '\end_inset'
Token: 'filename'
Token: 'lyxscale'
Token: 'width'
Token: '\end_inset'
Token: 'filename'
Token: 'lyxscale'
Token: 'width'
Token: '\end_inset'
Token: 'filename'
Token: 'width'
Token: '\end_inset'
Token: 'filename'
Token: 'lyxscale'
Token: 'width'
Token: 'keepAspectRatio'
Token: '\end_inset'
Token: 'filename'
Token: 'width'
Token: '\end_inset'
The font scaling factor is 109.35
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
LoaderQueue: waking up
LoaderQueue: 2 items in the queue
Recognised Fileformat: eps
[graphics::CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file:
/Users/khofbaue/Publications/2007_09 Corpus
Report/eurocontrol_logo_text_clean.eps
with displayed filename: ~/Publications/2007_09 Corpus
Report/eurocontrol_logo_text_clean.eps
Recognised Fileformat: eps
The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
No conversion needed (file in file cache)!
Loading image.
Image loading succeeded.
graphics::Image::getScaledDimensions()
params.scale : 10
width : 80
height : 70
Recognised Fileformat: eps
[graphics::CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file:
/Users/khofbaue/Publications/2007_09 Corpus Report/TUG_logo_lang.eps
with displayed filename: ~/Publications/2007_09 Corpus
Report/TUG_logo_lang.eps
Recognised Fileformat: eps
The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
Converting it to ppm format.
Converter c-tor:
from_file: /Users/khofbaue/Publications/2007_09 Corpus
Report/TUG_logo_lang.eps
to_file_base: /tmp/lyx_tmpdir16287QOTZ2M/CacheItem16287uf6uFO
from_format: eps
to_format: ppm
build_script ... No converter defined! I use convertDefault.py
python -tt
"/Applications/TeX/LyX.app/Contents/Resources/scripts/convertDefault.py"
eps:' + '"' + infile + '"' + ' ppm:' + '"' + outfile + '"' + '
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("/Users/khofbaue/Publications/2007_09
Corpus Report/TUG_logo_lang.eps")
outfile =
utf8ToDefaultEncoding("/tmp/lyx_tmpdir16287QOTZ2M/gconvert016287P03tEs.eps")
shutil.copy(infile, outfile)
os.chdir(utf8ToDefaultEncoding('/tmp/lyx_tmpdir16287QOTZ2M/'))
infile = outfile
outfile =
utf8ToDefaultEncoding("/tmp/lyx_tmpdir16287QOTZ2M/CacheItem16287uf6uFO.ppm")
if os.system(r'python -tt
"/Applications/TeX/LyX.app/Contents/Resources/scripts/convertDefault.py"
eps:' + '"' + infile + '"' + ' ppm:' + '"' + 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 = utf8ToDefaultEncoding(outfile)
tofile =
utf8ToDefaultEncoding("/tmp/lyx_tmpdir16287QOTZ2M/CacheItem16287uf6uFO.ppm")
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
Unknown device: pam
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
Unknown device: pam
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
convert: Postscript delegate failed
`/tmp/lyx_tmpdir16287QOTZ2M/gconvert016287P03tEs.eps'.
convert: missing an image filename
`ppm:/tmp/lyx_tmpdir16287QOTZ2M/CacheItem16287uf6uFO.ppm'.
/Applications/TeX/LyX.app/Contents/Resources/scripts/convertDefault.py ERROR
Execution of "convert" failed.
ForkedCallQueue: I'm going to sleep
Image conversion failed.
Unable to find converted file!