Open mustafasoylu opened 8 months ago
I would like to add that this is not an rdflib-specific problem, but in fact rdflib is correct in expecting a path starting with file:///
also on Windows, e.g. see here
As on Unix (i.e. linux and mac) absolute paths start with /
, prepending file://
yields the desired result. On Windows, one needs to prepend file:///
and replace \
with /
, so that the correct path looks like file:///c:/.../...
.
But this means that codemetapy must be fixed in multiple places (probably it needs a proper cross-platform "to file uri"/"from file uri" utility function), I tried to find a minimal non-invasive fix, but failed (because of many inline uses of replace
with file://
in certain methods).
When I use codemetapy on Windows, the below error has occured.
I checked where the error occurs and it looks like when creating file path, you add 'file://' to the string, such as below.
If you check this issue, I opened in rdflib, you can see rdflib make a string replacement like below.
Since Windows paths does not start with '/', when you only add 'file://' to the beginning, rdflib cannot read the files and the errors I mentioned occurs.