Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

My computer will not open a project i have been working on for weeks! it is coming up with an error of

Project file read error: unexpected end of file at line 1 column 1 for file C:/Users/xxxx/Documents/Nxxxx/Exxxx.qgs

Is there anyway to get it back?

share|improve this question
    
Was this file made with an earlier version of QGIS? I have had problems opening older files after upgrading Quantum. –  s_a Sep 13 '12 at 14:20
    
You can also look at the project file, since it is text based (XML). –  lynxlynxlynx Sep 13 '12 at 14:26
    
How do i look up the project file? It was created on an earlier one but think it crashed when i tried to save. –  Gerald Sep 13 '12 at 14:37
    
Just follow the path mentioned in the error path. The file is a text file, so you can open it with any text editor. I'm using notepad++ for such things. once installed, you can open every file with it by right-clicking in the explorer. –  Andre Joost Sep 13 '12 at 17:18

2 Answers 2

up vote 2 down vote accepted

Just encountered same problem (error while saving, couldn't reopen project) and mostly resolved it --> Open your .qgs project file with a text editor (e.g. notepad, notepad++, textedit) and it should show the xml markup.

The 'unexpected end of file' is because the application did not finish saving the end of the document, and so there are xml tags that were not closed. Add closing tags where needed, for example my file needed: /maplayer /projectlayers properties /properties /qgis

It will be easier if you can open a project file that is working with notepad as well to compare the differences.

hope this helps.

share|improve this answer

Your data is not in the .qgs file, but in shapefiles or spatialite databases you added to the project. So your data is not lost.

You can always create a new project, and add the same layers as before. Only styling may be lost. You can save that too in a file, if it is worth saving.

share|improve this answer
    
I know this. it is just that there is an amount of data that i do not wish to have to rebuild. which is what i ended up doing in the end. –  Gerald Oct 16 '12 at 9:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.