Skip to content

fix utils.py to not load contents as file paths#217

Merged
edmondchuc merged 5 commits intoRDFLib:masterfrom
JaeTLDR:patch-1
Apr 6, 2024
Merged

fix utils.py to not load contents as file paths#217
edmondchuc merged 5 commits intoRDFLib:masterfrom
JaeTLDR:patch-1

Conversation

@JaeTLDR
Copy link
Contributor

@JaeTLDR JaeTLDR commented Apr 5, 2024

Looks like PyLode is attempting to open a file with ontology however if this is a serialised graph the server can error trying to load this file
image

I have added a small simple detection logic however it may be simpler to pass the ontology variable to RDFLib and get it to do the path vs graph and the file type detection rather than rolling its own. Additionally i noticed a lack of strip() on the imput, this may cause errors with the data type detection not firing corretly

@edmondchuc
Copy link
Collaborator

Thanks, I've refactored the code a bit and added a test.

@edmondchuc edmondchuc merged commit c1ad9f3 into RDFLib:master Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants