-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues installing YAML ontologies in 3.4.1 #522
Comments
have you tried running |
I am not able to reproduce the error. Are you using Windows? My suggestion:
Note: It looks like we forgot to increase the patch number in the release, I believe the version you are using is in fact 3.4.2 |
|
Could you open a python command line and run the following, please? import os; os.path.join(os.path.expanduser("~"), ".osp_ontologies") I don't really understand why yours is missing the |
This gives the expected (correct) response.
If I have some time this week I'll try to debug through the code, looking for anything that edits that path. |
I believe @urbanmatthias (in charge of this code) is back tomorrow, so he should be able to give us a better insight! |
Hi, thanks for reporting this issue. We are using the serialize method of rdflib to store the installed ontologies. Obviously the second path is wrong - It should start with The path is constructed in which is the command you executed and which returned the correct path. Can you check if you have an outdated version of rdflib installed?
Can you print the Can you print |
Just as a side note, enabling debug log messages will almost always not change the traceback - but it might give us more information that can help us debugging. I'm afraid that in this case it wouldn't help much, because I didn't add any log messages that print the path. It probably would make sense to add some at the places I specified above. Anyway, maybe we have luck and there is something helpful in the logs, so could you please rerun with |
Okay I just tried to reproduce on my windows machine but couldn't. |
I get the same version of rdflib as you (5.0.0), prints of the requested variables are below. path_graph from namespace_registry.py: _path from namespaces.py: I think I've found the line that's stripping the drive from the path though; rdflib's graph.serialize() function calls urlparse() (from a version of the urllib library packaged within six I think), this appears to remove the drive. I can reproduce this with the following test code:
Which outputs:
|
You are right, I see the line in rdflib and I have the same result when I execute the code you posted. But it seems like leaving out the
Maybe you have multiple drives, and therefore shutil wants the user to specify it? |
I created a rdflib issue. Feel free to add anything you like: RDFLib/rdflib#1170 |
I do have multiple drives, this probably the likely cause. The shutil.move() call does fail if no drive identifier is provided. |
Okay let's see whether the rdflib guys answer, if not we'll either fork the repo or subclass the graph. |
Can you check if it works with this branch: https://github.com/urbanmatthias/rdflib/tree/patch-1 This is the change I did: urbanmatthias/rdflib@81d0f99 Will create a PR if it works. |
This version of rdflib works like a charm, I can install my ontology successfully now. Many thanks @urbanmatthias! |
I close this issue, as the rdflib devs merged my pr: RDFLib/rdflib#1172 |
Hello, I have just done a clean "osp-core" and "simcmclkinetics" wrapper install. It seems this issue is not fixed as I got the same error as Michael when I tried to install cmcl ontology via pico. As I understand the rdflib devs indicated that the issue is fixed on their side, maybe they forgot to merge it or we have a wrong rdflib version number set in the osp-core requirements file? When I re-installed everything I made sure that I purged conda and pip caches so that during installation pip was forced to download the rdflib from the remote PyPI repository rather than using the cached version. This did not help either. Could you please advise? |
Hey, have you tried to install the latest rdflib master from source? I think the latest release does not contain the fix. I agree that this should be documented on our side in an error message (or have another fix on our side that works with the latest rdflib release) |
Thanks Matthias, installing rdflib directly from its github source fixed the issue. |
I'm having issues installing the example YAML ontology provided by the SimDomeWrapper repository using OSP Core 3.4.1 (2824724). This is using Python 3.8.5 on Windows.
Note that the same YAML file installed correctly under OSP Core 3.3.8.
YAML file used: simdome.ontology.yml.txt
The text was updated successfully, but these errors were encountered: