2

I tried to re-open a QGIS map document that referenced several layers stored in geopackages. These layers failed to load, with the "Handle unavailable layers" dialog. I think they were open in -wal mode when QGIS crashed. QGIS won't open these geopackages at this point, I tried opening them in R using the sf package, but this fails with the message that the geopackage is wal mounted.

I tried copying the geopackage and reopening, based on information that suggested that I'd potentially lose uncommitted changes, but after copying the file it still failed to load. The .wal file appears empty (0kb and looked empty if I opened in a text editor). I can see both the .wal and .shm files in my file explorer.

Edit- I copied the entire directory with my project onto another drive, but without the .wal and .shm files. When I did so, I was able to open the QGZ file and load the problematic layers. I then tried to delete the recent files from the working directory and replace them with the working copy from the backup drive, but they still didn't load the layers stored in the geopackage.

Is there a way to rescue these files, or do I just need to give up and roll back to my last backup?

Further, are there best practices to use to prevent this in the future?

1 Answer 1

1

Don't know why or what happened but this was same issue as one I previously encountered: Geopackages don't work on drive D:/ Repaired by changing the drive letter. After doing so I could change it back and everything works again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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