Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6uyL-00GQWE-Lf for psycopg@arkaria.postgresql.org; Fri, 01 Nov 2024 16:58:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t6uyJ-00FWz2-Ix for psycopg@arkaria.postgresql.org; Fri, 01 Nov 2024 16:58:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6uyJ-00FWyu-Be for psycopg@lists.postgresql.org; Fri, 01 Nov 2024 16:58:03 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6uyD-003zXZ-61 for psycopg@lists.postgresql.org; Fri, 01 Nov 2024 16:58:02 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 4DBA913801E2; Fri, 1 Nov 2024 12:57:56 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 01 Nov 2024 12:57:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1730480276; x=1730566676; bh=JUrzLi/zhsmlXJwixhi6FF+hoBtfahxsFXb0w+qtbEA=; b= EDDbS6tMN0FdyOMpV8uV9XTBaLuw+dEp+89a3md1NG7cTw3lbtJwxISmRSkkeboL mPj0wgOBIwgqCgq7joKHc2J9fGdm4CVUNH1g33pSpE1CQUX/cf8yiveixhqqFcHV a69qdbglZr7PRtIowZQahra6IHnS/n6zqmQfvAa6SJ04+eM9mm7v/Wm+Ikh2s9T/ w+pKxO534Aj69dsk858wPJYnxBfLgCvVz55jBnYHoeBA3eJyEkYhiJlWgWwNNmmk GWKwoFnX80eVt2Qg9VVNOW3jKyBqwzd86ZzWx2empJh90rsdxHEgeQzbmoICzwzL rIxoIPnnFmelHizS6M3C9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1730480276; x=1730566676; bh=J UrzLi/zhsmlXJwixhi6FF+hoBtfahxsFXb0w+qtbEA=; b=YUl0HqVz2xNJLNeR6 ww0AWG21GWM7l7JZu51vCnP7hb9poSgMKN/2RLn2NjG2qF77g5QVtv4w/Ri06zM2 QtzZrLaetlkWhtmucP2IVZfugR6+fchBbPDMG2OfbeUOh3zhsFuA2YthPNMBhOn5 tvNbfzopJsfrDDbG23EUNoOPLz2W4egTSRsh7QXJe+SB9OuzvwTHwTdLfJXS7cy4 w3pFS0WvQh6FUg1nhZ539Q/VAr6+s7QrvPlF5l7F2DSRwXCW17+E9asPgiJQtHTI rFTWAvTzekZbAgWy/hIrKaM+qzJKsdpGspovDnHgIGbf9qwQWSFMEaFQKUvytWUl qHlhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekledgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghr uceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrth htvghrnhepffelgeeifefgveduhedthfekuedtffejveegffegjeevtdehgfduieetfeeh jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg gurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepthhhihgvmhhosehgvghlrghssh gvnhgvqdhpfhgvrhguvgdrsghiiidprhgtphhtthhopehpshihtghophhgsehlihhsthhs rdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Nov 2024 12:57:55 -0400 (EDT) Message-ID: Date: Fri, 1 Nov 2024 09:57:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: TypeError: dict is not a sequence To: thiemo@gelassene-pferde.biz, psycopg References: <20241101111747.Horde.GgVaeCJ_Ig6HsmcfjbNwguM@webmail.gelassene-pferde.biz> <20241101161113.Horde.0Bgt_EQ0glbsBmc_1YpZj90@webmail.gelassene-pferde.biz> <99a9cec1-09a0-41fb-91b2-d153c4ccf5a4@aklaver.com> <20241101174905.Horde.JW_MNbPlBgYSivspissyvPF@webmail.gelassene-pferde.biz> Content-Language: en-US From: Adrian Klaver In-Reply-To: <20241101174905.Horde.JW_MNbPlBgYSivspissyvPF@webmail.gelassene-pferde.biz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/1/24 09:49, thiemo@gelassene-pferde.biz wrote: > > Adrian Klaver escribió: > >>> psycopg2.errors.InternalError_: RASTER_fromGDALRaster: Could not open >>> bytea with GDAL. Check that the bytea is of a GDAL supported format >> >> This looks to be on the PostGIS end related to the ST_FromGDALRaster() >> function. Does: >> >> select ST_FromGDALRaster(the_field); >> >> work in psql? > > Thanks for looking into it. I am not sure, however, what you refer to > with the_field. Be it as it may, the following might answer your question. It was just a placeholder name to represent whatever field the function was working on. The error messages spell out the problem. or at least an initial one, the GDAL drivers are not being loaded. Looks like the connection user does not have sufficient privileges to load them. > > thiemo @ hotrod ~ % psql -p 5447 -d treintaytres -U treintaytres > psql (17.0 (Debian 17.0-1.pgdg120+1)) > Type "help" for help. > > treintaytres=> set postgis.gdal_enabled_drivers = 'ENABLE_ALL'; > SET > treintaytres=> WITH foo AS ( >     SELECT > ST_AsPNG(ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, > 0.1, -0.1, 0, 0, 4326), 1, '8BUI', 1, 0), 2, '8BUI', 2, 0), 3, '8BUI', > 3, 0)) AS png > ), > bar AS ( >     SELECT 1 AS rid, ST_FromGDALRaster(png) AS rast FROM foo >     UNION ALL >     SELECT 2 AS rid, ST_FromGDALRaster(png, 3310) AS rast FROM foo > ) > SELECT >     rid, >     ST_Metadata(rast) AS metadata, >     ST_SummaryStats(rast, 1) AS stats1, >     ST_SummaryStats(rast, 2) AS stats2, >     ST_SummaryStats(rast, 3) AS stats3 > FROM bar > ORDER BY rid; > WARNING:  permission denied to set parameter "postgis.gdal_enabled_drivers" > ERROR:  rt_raster_to_gdal: Could not load the output GDAL driver > CONTEXT:  PL/pgSQL function st_aspng(raster,text[]) line 31 at RETURN > > > > Many thanks for your support. > > > > -- Adrian Klaver adrian.klaver@aklaver.com