LaTeX forum ⇒ LyXProblem opening .lyx file

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
DavidM
Posts: 20
Joined: Wed Jul 01, 2009 9:52 pm

Problem opening .lyx file

Postby DavidM » Fri Feb 04, 2011 5:26 pm

Hi everyone,

I am using Lyx 1.6.7. I saved an important .lyx file on my memory stick, and I cannot open it in Lyx anymore. I get the following error information:

  1. Error returned from iconv
  2. EINVAL An incomplete multibyte sequence has been encountered in the input.
  3. When converting from UTF-8 to UCS-4LE.
  4. Input: 0x61 0x64 0x62 0x64 0xcb
  5. Error returned from iconv
  6. EILSEQ An invalid multibyte sequence has been encountered in the input.
  7. When converting from UTF-8 to UCS-4LE.
  8. Input: 0xca 0x42 0x65 0x63 0x60 0x68 0x4f 0x6c
  9. Completed


I can open the file in notepad and see my text. Now I could copy the text into a new lyx file and redo the many formulas. But given the amount of formulas in the document, I would like to open it in lyx.

This file is a child document in another document. The 'mother' file has the same error. Perhaps this has something to do with it.

Does anyone know how to recover the file?

Regards,
David

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Fri Feb 04, 2011 8:49 pm

For starters, make sure that you don't have and non-ascii characters in the path to the .lyx file (as well as in the name of the .lyx file itself). Characters like ê, à, č, đ etc. in the path often cause problems, and not only with LyX.

If this isn't the problem, try using LyX 1.6.8 to open the file.

DavidM
Posts: 20
Joined: Wed Jul 01, 2009 9:52 pm

Postby DavidM » Sat Feb 05, 2011 12:07 am

Thanks for your reply!

I found out the problem. Lyx made an error while writing the file away last time, and forgot to put
  1. \end_body
  2. \end_document

at the end of the document, so LyX just kept on going. It also deleted some of my text. Luckily a .lyx~ file with the complete correct code was also in the folder, so I copied this code to the .lyx file and all is well now :D What is that .lyx~ anyway?

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Sat Feb 05, 2011 3:04 am

.lyx~ is a backup file which is produced by default automatically every 5 minutes and when saving your file (Tools > Preference > User Interface > Documents). These files are invisible on Linux, but I'm not sure about Windows.

DavidM
Posts: 20
Joined: Wed Jul 01, 2009 9:52 pm

Postby DavidM » Sat Feb 05, 2011 10:31 am

Thanks! Wish I had known this before I despaired of recovering my document.

Yes, .lyx~ is visible in windows.


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 4 guests