4

I've been working on this project for over a year and I have never had any substantial problem. Two days ago I was working on the project and everything worked fine. Today, when I try to load the project, I get the following:

enter image description here

The layer in question depicts points on my map. If I click on "Keep Unavailable Layers" and hover my mouse over the layer in question in the layers pane, I get the following message: Unavailable layer! Layer data source could not be found. Click to select a new data source.

enter image description here

I click and select the exact same data source, i.e. I "remind" QGIS where the .csv file is located, but then almost nothing seems to happen, apart from the layer's symbol changing from three dots to a cute cinderblock. The points on my map do not come back. enter image description here I am certain that neither the .qgs project file nor the .csv have been moved. Nor have I updated my operating system. The problem surfaced with QGIS 3.10 running on MacOS 11.1 (Big Sur), but I have tried with QGIS 3.16 too and I get the same error. The source file is readable by QGIS, because I can create a new layer with the same csv file and it works.

Why is this happening? How can I get my layer back?

Edit: If I try to copy the style (Styles > Copy Style > All styles categories) of the cinderblock layer to a newly created layer with the same source file (Styles > Paste style > All styles), I get the following error:

enter image description here

But if I copy the style before the old layer becomes a cinderblock (i.e. before clicking "click here to select a new data source"), I do get back my old points...

enter image description here ...but I don't get back the callout lines (the lines between the labels and the points). Before the problem, it looked like this (from a PDF file):

enter image description here

If I try to zoom in on this region in QGIS...

enter image description here

...I get this: enter image description here

Meanwhile the callouts on the new layer are defined like this (it used to say 0 mm of minimum length, I changed it to 3mm to no avail, nothing changes).

enter image description here

The content of the non-working Datasource (the one in the first screenshot) is file:../../../Articles/[Some folder name]/[some file name].csv?type=csv&delimiter=%5Ct;&detectTypes=yes&xField=longitude&yField=latitude&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no The content of the Datasource in the working layer is: file:///[Some path]/[Some file name].csv?type=csv&maxFields=10000&detectTypes=yes&xField=longitude&yField=latitude&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no

The delimiters appear different in these two versions (%5Ct; in the first, and not mentioned in the second so presumably commas). But when I try to paste the working Datasource path in the problematic layer, the problem is not resolved.

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – PolyGeo
    Commented Jan 4, 2021 at 23:16

1 Answer 1

1

As a workaraound, you can load the CSV as a new layer and replace the old (broken) layer with this new one. You mention that you have no problem to load the same CSV as a new layer. You could just copy/paste all styling information from the old to the new one. Be sure to select All Style Categories.

To see your callout lines, increase the distance of your labels: your callouts are there, but the distance of the label from the point symbol is too small to be seen.

6
  • Danke. The problem with this is that I seem to lose the placement of my labels when I simply copy and paste the style. In the original, now broken, layer I had carefully and manually placed each one of the 182 labels. If I spend the time to replace them correctly, perhaps the new layer will break in the future too and then I will have to start over again.
    – Pertinax
    Commented Jan 4, 2021 at 22:42
  • Do you still have the older QGIS version installed where you made all this settings?
    – Babel
    Commented Jan 4, 2021 at 22:43
  • This morning I got rid of QGIS 3.10.xx (the version I had been using for a while) in favour of a more recent QGIS 3.10.yy (aside from installing QGIS 3.16 too). I no longer have the earlier version of QGIS 3.10, although I have the more recent one.
    – Pertinax
    Commented Jan 4, 2021 at 22:47
  • You can still find older versions for download at the QGIS website
    – Babel
    Commented Jan 4, 2021 at 22:50
  • Unfortunately I cannot find older versions of QGIS 3.10 for Mac on the QGIS website. You can either download the most recent QGIS 3.10, or you can download precise versions of QGIS up to 3.8, here: qgis.org/downloads/macOS
    – Pertinax
    Commented Jan 4, 2021 at 22:57

Your Answer

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

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