You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i use pyswip in flask func like this:
@app.route("...")
def lala():
p = Prolog()
p.consult('somepath')
it will raise :
OSError: exception: access violation reading 0x0000000000000050
it seems like pyswip cannot work well with asyn
so i try to use a lock
but this problem still exist when i used a lock
:(
The text was updated successfully, but these errors were encountered:
See:
#74
1) your code is not async (it would probably work if it were)
https://flask.palletsprojects.com/en/2.0.x/async-await/
2) If you plan to multi-thread, at a minimum you'll need one prolog engine
per thread. `Prolog()` does not create a new engine per thread.
See:
#74
On Thu, Jan 20, 2022 at 3:00 AM gamblerltl ***@***.***> wrote:
when i use pyswip in flask func like this:
@app.route("...")
def lala():
p = Prolog()
p.consult('somepath')
it will raise :
OSError: exception: access violation reading 0x0000000000000050
it seems like pyswip cannot work well with asyn
so i try to use a lock
but this problem still exist when i used a lock
:(
—
Reply to this email directly, view it on GitHub
<#140>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3QJLHQPJCXWI6XBGRHPK3UW7TLFANCNFSM5MMNMAKQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
when i use pyswip in flask func like this:
@app.route("...")
def lala():
p = Prolog()
p.consult('somepath')
it will raise :
OSError: exception: access violation reading 0x0000000000000050
it seems like pyswip cannot work well with asyn
so i try to use a lock
but this problem still exist when i used a lock
:(
The text was updated successfully, but these errors were encountered: