-
Notifications
You must be signed in to change notification settings - Fork 22
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
Cannot reload Pymedtermino2 Quadstore Non-Exclusively #9
Comments
I'm having the same issue. But this is apparently not the github repository of the package maintainer. ETA: aha, the forum URL has been updated on Bitbucket to http://owlready.306.s1.nabble.com (this has not yet propagated to readthedocs etc) |
Did you find any workaround for this issue? |
Yes, this is just a fork of the original repo
…On Mon, 30 Aug 2021 at 14:42, pseudomonas ***@***.***> wrote:
I'm having the same issue. But this is apparently not the github
repository of the package maintainer.
The package mailing list is http://owlready.8326.n8.nabble.com but that's
broken. https://bitbucket.org/jibalamy/owlready2/src/master/ is the
primary package repository
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIFYTBSA3DMH274PRXEZSLT7ODCRANCNFSM475PWW6A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hello, I am working on a project where several processes need to use the Pymedtermino2 submodule concurrently and am having issues on both reloading the quadstore after the initial importation, and also non-exclusively accessing the reloaded quadstore.
When working with the first importation using the following code, everything works perfectly and I can access the database from multiple processes concurrently.
My problems start to arise when I am trying to reload the data from the quadstore saved in pym.sqlite3. If I am starting fresh and just imported everything, the following code can be run multiple times from different processes.
if not os.path.exists('pym.sqlite3'):
try:
default_world.set_backend(filename = "pym.sqlite3", exclusive=False)
PYM = get_ontology("http://PYM/").load()
default_world.save()
except:
PYM = World(filename= 'pym.sqlite3', exclusive=False).get_ontology('http://PYM").load()
The try block is placed there since upon the second time calling set_backend in a session, I recieve a ValueError: Cannot save existent quadstore in 'pym.sqlite3': File already exists! Use a new filename for saving quadstore or, for opening an already existent quadstore, do not create any triple before calling set_backend().
Additionally, I am getting many variations on OperationalError: database is locked whenever I try to access the database repeatedly.
Is there any guidance on what I am doing wrong or are there any possible bugs? Thanks for the help.
The text was updated successfully, but these errors were encountered: