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:
The content of "Datasource" in this 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 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.
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. 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:
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...
...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):
If I try to zoom in on this region in QGIS...
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).
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.