Tuesday 26 April 2016

QGIS File Read Error when opening an existing project


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?



Answer



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...