Error using API with Heroku

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error using API with Heroku

Frack
Hi,

I'm trying to deploy a python app and using it using webhook with heroku, but I'm facing an issue when calling my app.

I have this in the log file:

2018-06-25T08:34:58.963179+00:00 app[web.1]:   File "OntowlogieAPI.py", line 4, in <module>
2018-06-25T08:34:58.963473+00:00 app[web.1]:     default_world = IRIS = World()
2018-06-25T08:34:58.963474+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/owlready2/namespace.py", line 228, in __init__
2018-06-25T08:34:58.963340+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/owlready2/__init__.py", line 106, in <module>
2018-06-25T08:34:58.963656+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/owlready2/triplelite.py", line 55, in __init__
2018-06-25T08:34:58.963791+00:00 app[web.1]: sqlite3.OperationalError: near "WITHOUT": syntax error
2018-06-25T08:34:58.963772+00:00 app[web.1]:     self.execute("""CREATE TABLE resources (storid TEXT PRIMARY KEY, iri TEXT) WITHOUT ROWID""")
2018-06-25T08:34:58.963655+00:00 app[web.1]:     self.graph = Graph(filename)

The problem is that it's not possible to chose the sqlite version in Heroku, is there a way to fix it through the API directly?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Error using API with Heroku

Frack
I add that the problem is similar when using Openshift as host to provide webservice.

I see that SQLite is not recommanded for production objectives, but is prefered to use PostGRE.
Would it be possible (and would it be a good idea) to think about migrating to PostGRE?
Reply | Threaded
Open this post in threaded view
|

Re: Error using API with Heroku

Jiba
Administrator
Hi,

The development version of Owlready2 has an experimental support for PostgresQL (however, performances are lower than with SQLite). You may try it.

Best regards,
Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Error using API with Heroku

Frack
Hi,

Merci je vais tester ça