Skip to content

[BUG] duckdb visualization using viz() is broken from duckdb=1.2.0 onwards #771

Closed
@danielsparing

Description

@danielsparing

Context

What results were you expecting?

Trying to use the viz(query) pattern from here.

Resulting behaviour, error message or logs

Describe what happened:

> viz(duckdb.sql("install spatial; load spatial; select st_point(1, 1) geom"))
# Returns:
# TypeError: execute(): incompatible function arguments. The following argument types are supported:
#    1. (query: object, parameters: object = None, *, connection: duckdb.DuckDBPyConnection = None) -> duckdb.DuckDBPyConnection
# 
# Invoked with: '\n            INSTALL spatial;\n            LOAD spatial;\n            SELECT ST_AsWKB( geom ) as geom FROM rel;\n            '; kwargs: connection=<built-in method default_connection of PyCapsule object at 0x[..]>

Environment

  • OS/Browser: Google Colab
  • Lonboard Version: 0.10.4
  • duckdb: 1.2.0 or 1.2.1 (the plot draws just fine on 1.1.3)

Steps to reproduce the bug

On Google Cloab:

!pip install lonboard --quiet
!pip install --upgrade duckdb --quiet

import duckdb
from lonboard import viz

viz(duckdb.sql("install spatial; load spatial; select st_point(1, 1) geom"))
# Returns:
# TypeError: execute(): incompatible function arguments. The following argument types are supported:
#    1. (query: object, parameters: object = None, *, connection: duckdb.DuckDBPyConnection = None) -> duckdb.DuckDBPyConnection
# 
# Invoked with: '\n            INSTALL spatial;\n            LOAD spatial;\n            SELECT ST_AsWKB( geom ) as geom # FROM rel;\n            '; kwargs: connection=<built-in method default_connection of PyCapsule object at 0x[...]>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions