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 1t6uGA-00GM8V-C0 for psycopg@arkaria.postgresql.org; Fri, 01 Nov 2024 16:12:26 +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 1t6uG7-00F9OB-KR for psycopg@arkaria.postgresql.org; Fri, 01 Nov 2024 16:12:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6uG6-00F9Ne-6R for psycopg@lists.postgresql.org; Fri, 01 Nov 2024 16:12:23 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6uG2-004Cyl-FK for psycopg@lists.postgresql.org; Fri, 01 Nov 2024 16:12:21 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 91DCA1140098; Fri, 1 Nov 2024 12:12:15 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Fri, 01 Nov 2024 12:12:15 -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=1730477535; x=1730563935; bh=T8jU46vOIgDjBy+EjMe5bszqTV0rrRgep/dZn2fE/mk=; b= lnyTztmVgsCSk48KSNFpkXaJ2i2Ww2YJRehNPHnn52m2Ul+rK3THYrem2bNInnWn zURpOTDtkSSvVwCkwpDO2dDUzhwpp2OkUdaSN/XNlBpr1GOusyjbWLn1I9h0rW6i nAp2HWzrdM3pJuFlW4Rdhdhm898X5zA8AxtbZBdCYEaM6IH7ek+E84VWJowrpUkp JGH6ZaAKsVMIMOKAjI1+hlerRUXsLJ/DxWHgzr//bv1vb7BaXbLBsPe/M2TOA1bJ zLb9fn+fNSGDqQ9sHQVuUf+rmoJ4QBuZ663S0IJwlnLLgCpYO+so1XCdjbrZj89n ZFmXYzuDYr1bkE4+RbLo2Q== 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=1730477535; x=1730563935; bh=T 8jU46vOIgDjBy+EjMe5bszqTV0rrRgep/dZn2fE/mk=; b=il6IH6IFcTrbDeDSO 5iIvYzWlPZMznHHWBcxplE/a0eqDrNm3CMfbfD+Y5/ro7BdsE/076Jm0vfnVjdQC q7gxNShw7fHtwSxoknCqovfQnpdtvy1jgceqbU4BokWrJydkxjNZ2WKygTm+H0vQ Gt4iJVWUrF6pyRR2Ym7qnb/+O3pnzNBcKntOBRdcxyo+CiGTCk0LyakCYt70W/Hp hyn6Od4fXcWxg6YUXIZ4JWWrPRCHD0Y/oojAFUNOlAzlCsOcRgHfCpynhEY/3T+5 Vyr2dF3i10RWLGaUMvGL5iOkzIc8vTY6+e0E50rrw+5kGTrFIVbiNlP9GcItB/mx daxLA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekledgkeehucetufdoteggodetrfdotf 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:12:14 -0400 (EDT) Message-ID: <99a9cec1-09a0-41fb-91b2-d153c4ccf5a4@aklaver.com> Date: Fri, 1 Nov 2024 09:12:13 -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> Content-Language: en-US From: Adrian Klaver In-Reply-To: <20241101161113.Horde.0Bgt_EQ0glbsBmc_1YpZj90@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 08:11, thiemo@gelassene-pferde.biz wrote: > Hi Jim > >> I suspect the source of the problem is the commented-out line >> >>  -- ST_FromGDALRaster(pg_read_binary_file(%s)), >> >> in the statement. > > You are right. I was not expecting the comment to be relevant for the > parameter replacement. Many thanks for the hint. That is an SQL(---) comment and I am guessing the parser sees the parameter before it gets to the comment. > > I now have an error, not related to psycopg, as far as I can tell. > > 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? > >> Maybe the difference in the errors is due to a different version of >> psycopg? This is what I am using: >> >>>>> sys.version >>> '3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0]' >>> >>> psycopg.__version__ >>> '3.2.3' > > Probably. >>>> sys.version > '3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0]' >>>> psycopg.__version__ > '3.1.7' > > > Many thanks for your support. > > > -- Adrian Klaver adrian.klaver@aklaver.com