You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you built asyncpg locally, which version of Cython did you use?:
Can the issue be reproduced under both asyncio and uvloop?: yes
,asyncpg.exceptions._base.InternalClientError: no binary format encoder for type jsonb (OID 3802)
async def insert_binary(self, table, rows):
if rows:
rows = common_function.convert_data_type(rows, decimal.Decimal, float, )
columms = rows[0].keys()
data = []
for row_index, rows_once in enumerate(rows):
data_once = [rows_once[columns_once] for columns_once in columms]
data.append(tuple(data_once))
conn = await self.connect()
await conn.copy_records_to_table(table,records=data, columns=rows[0].keys())
await conn.fetch('SELECT 1')
await conn.close()
I've tried various methods, but I couldn't manage to insert binary data. I've tried using decoders and other approaches. It seems like it needs a binary decoder, not a text one, but I haven't figured out how to represent it in binary. I'd appreciate any help.
"I replaced 'numeric' with 'float' (database field types), and the problem 'no binary format encoder for type numeric' disappeared. However, I couldn't figure out which format decoder is needed for JSON."
The text was updated successfully, but these errors were encountered:
asyncpg version: 0.29.0
PostgreSQL version: 16
Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?:
Python version: 3.11
Platform: 5.10.0-21-arm64 Other examples? #1 SMP Debian 5.10.162-1 (2023-01-21) aarch64 GNU/Linux
Do you use pgbouncer?:no
Did you install asyncpg with pip?: yes
If you built asyncpg locally, which version of Cython did you use?:
Can the issue be reproduced under both asyncio and
uvloop?: yes
,asyncpg.exceptions._base.InternalClientError: no binary format encoder for type jsonb (OID 3802)
I've tried various methods, but I couldn't manage to insert binary data. I've tried using decoders and other approaches. It seems like it needs a binary decoder, not a text one, but I haven't figured out how to represent it in binary. I'd appreciate any help.
"This also doesn't work."
"I replaced 'numeric' with 'float' (database field types), and the problem 'no binary format encoder for type numeric' disappeared. However, I couldn't figure out which format decoder is needed for JSON."
The text was updated successfully, but these errors were encountered: