Syntool installation - syntool-meta2sql problem
#1
Hi,
Not sure if this is the correct place to ask installation questions. Please redirect me if it is not.

I have downloaded (from https://ftp.odl.bzh/odl/syntool/and built the syntool code with no obvious errors. syntool-converter and syntool-ingestor run OK and produce a json file. When I run syntool-meta2sql on the json I get the error:
NotImplementedError: Don't know how to literal-quote value u'POLYGON((0.356966801331357.......

It looks like the version of SQLAlchemy I am using does not know how to deal with WKT. Have I missed something in the config?

Full output from command attached.

Thanks,
Pete


Attached Files
.txt   syntool.txt (Size: 6.76 KB / Downloads: 4)
Reply
#2
Hi Pete,

syntool-metadata should be able to handle any metadata.json file produced by syntool-ingestor, so I share your suspicion about the SQLAlchemy version.

Could you please tell us which version of SQLAlchemy is installed in your environment? You can get this information using the following command:

Code:
pip show SQLAlchemy

If possible, could you also include the metadata.json file in the attachments so we can check its content and try to reproduce the problem?

Cheers,

Sylvain
Reply
#3
Hi Sylvain,

Thanks for the quick response. I have attached the json file.

The SQLAlchemy version is below:

root@a0d0024659e5:~# pip show SQLAlchemy
Name: SQLAlchemy
Version: 1.4.11
Summary: Database Abstraction Library
Home-page: http://www.sqlalchemy.org
Author: Mike Bayer
Author-email: mike_mp@zzzcomputing.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: importlib-metadata


Cheers,
Pete


Attached Files
.json   syntoolmetadata.json (Size: 7.47 KB / Downloads: 3)
Reply
#4
Hi Pete,

The problem is indeed the version of SQLAlchemy: the Syntool packages found in https://ftp.odl.bzh/odl/syntool have been published around 2018 if I remember correctly, so they worked with the latest SQLAlchemy version available at that time but incompatible changes have been introduced with later versions.

A simple workaround would be to downgrade SQLAlchemy to a version that doesn't contain these changes:

Code:
pip uninstall -y sqlalchemy
pip install "sqlalchemy<1.3.0"

Alternatively, you can install the syntool-exporter package available in the attachments of this message, it is an unreleased version but it should be compatible with the 1.4.11 version of SQLAlchemy.

Please let me know if one of these methods solved the problem.

Cheers,

Sylvain


Attached Files
.gz   syntool_exporter-0.1.19.tar.gz (Size: 5.68 KB / Downloads: 0)
Reply
#5
Hi Sylvain,

SQLAlchemy 1.3.0 worked, thank you. I will continue testing with that as it is easy to downgrade (all in a Docker container). Would you recommend using the newer exporter package?
We were hoping to use Syntool as a quick way of publishing/viewing a number of project related datasets so I am trying to get a simple workflow going for the process.

Thanks again for your help.

Cheers,
Pete
Reply
#6
Glad to hear that it worked and that Syntool will be useful to you Smile

Your approach sounds quite good: once you have the processing tools installed and working in a container, you can scale by spawning or destroying containers depending on you needs. All you have to keep online permanently are the elements required to run the Web portal (database, webservice, web server and the files produced by syntool-ingestor).

Compatibility with newer versions of SQLAlchemy is really the only advantage of the newer version of syntool-exporter, so if your environment is already set up and everything works I think it's okay to continue with the official release.

Cheers,

Sylvain
Reply
#7
Is the developer manual the best guide to setting up data ingestion or should I look elsewhere?
Reply
#8
There is no other documentation at the moment, so the developer manual is the most complete source of information regarding the data ingestion process. Don't hesitate to ask your questions here if there is something missing in the manual.
Reply
#9
(2021-04-29T10:04 AM)Sylvain Herlédan Wrote: There is no other documentation at the moment, so the developer manuel is the most complete source of information regarding the data ingestion process. Don't hesitate to ask your questions here if there is something missing in the manual.
Great. I am sure I will Smile
Thanks
Pete
Reply
#10
I found this post very interesting and informative. Thank you for sharing your special thoughts with us. I definitely share this with my peeps.
Reply


Forum Jump: