Skip to content
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

UndefinedFunctionError while Validating SQL fields in all layers of the tileset #1585

Open
abdallahkadour opened this issue Oct 2, 2023 · 2 comments

Comments

@abdallahkadour
Copy link

The error occurs when extracting the vector tiles of Germany using the quickstart script.

Command $ ./quickstart.sh europe/germany

Trace:

====> : Testing PostgreSQL tables to match layer definitions metadata
Using docker compose V1 (docker-compose)
docker-compose run --rm --user=503:20 openmaptiles-tools test-perf openmaptiles.yaml --test null --no-color
Traceback (most recent call last):
Connecting to PostgreSQL at postgres:5432, db=openmaptiles, user=openmaptiles...
* version()                       = PostgreSQL 14.5 (Debian 14.5-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
* postgis_full_version()          = POSTGIS="3.2.3 2f97b6c" [EXTENSION] PGSQL="140" GEOS="3.9.0-CAPI-1.16.2" PROJ="7.2.1" LIBXML="2.9.10" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"
* jit                             = off
* shared_buffers                  = 128MB
* work_mem                        = 4MB
* maintenance_work_mem            = 64MB
* effective_cache_size            = 4GB
* effective_io_concurrency        = 1
* max_connections                 = 100
* max_worker_processes            = 8
* max_parallel_workers            = 8
* max_parallel_workers_per_gather = 2
* wal_buffers                     = 4MB
* min_wal_size                    = 80MB
* max_wal_size                    = 1GB
* random_page_cost                = 4
* default_statistics_target       = 100
* checkpoint_completion_target    = 0.9

Validating SQL fields in all layers of the tileset
  File "/usr/src/app/test-perf", line 104, in <module>
    main(docopt(__doc__, version=openmaptiles.__version__))
  File "/usr/src/app/test-perf", line 100, in main
    asyncio.run(perf.run())
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/usr/src/app/openmaptiles/performance.py", line 123, in run
    await self._run(conn)
  File "/usr/src/app/openmaptiles/performance.py", line 140, in _run
    await self.mvt.validate_layer_fields(conn, layer_id, layer_def)
  File "/usr/src/app/openmaptiles/sqltomvt.py", line 267, in validate_layer_fields
    query_field_map = await self.get_sql_fields(connection, layer)
  File "/usr/src/app/openmaptiles/sqltomvt.py", line 299, in get_sql_fields
    st = await connection.prepare(f'SELECT * FROM {query} WHERE false LIMIT 0')
  File "/usr/local/lib/python3.9/site-packages/asyncpg/connection.py", line 566, in prepare
    return await self._prepare(
  File "/usr/local/lib/python3.9/site-packages/asyncpg/connection.py", line 584, in _prepare
    stmt = await self._get_statement(
  File "/usr/local/lib/python3.9/site-packages/asyncpg/connection.py", line 398, in _get_statement
    statement = await self._protocol.prepare(
  File "asyncpg/protocol/protocol.pyx", line 168, in prepare
asyncpg.exceptions.UndefinedFunctionError: function layer_transportation(geometry, integer) does not exist
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
make: *** [test-perf-null] Error 1


@TomPohys
Copy link
Member

It looks like there is some issue with generated mbtiles and metedata generator then raise an error. The rest of quickstart went without error?

@TomPohys
Copy link
Member

Hi @abdallahkadour, could you please provide some more info? Thanks.

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

No branches or pull requests

2 participants