Same here.
We use the latest version of 'instructure-dap-client 0.3.16'. When the code calls the 'content_tags', it shows error as below and the process has been stopped.
=====================================================================================================
Traceback (most recent call last):
File "/home/adm1/cd2/script/init_cd2db_ind_table.py", line 25, in <module>
asyncio.run(main());
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/adm1/cd2/script/init_cd2db_ind_table.py", line 21, in main
await SQLReplicator(session, db_connection).initialize("canvas", "content_tags")
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/replicator/sql.py", line 67, in initialize
await client.download(
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/downloader.py", line 83, in download
await wait_n(
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/concurrency.py", line 49, in wait_n
raise exc
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/downloader.py", line 81, in logged_download_and_save
await self._download(db_lock, context_aware_object, processor=processor)
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/downloader.py", line 113, in _download
await processor.process(obj, records)
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/integration/base_processor.py", line 19, in process
await self.process_impl(obj, self._convert(records))
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/plugins/postgres/init_processor.py", line 63, in process_impl
await self._db_connection.execute(
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/integration/base_connection.py", line 41, in execute
return await query(self._raw_connection)
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/plugins/postgres/queries.py", line 26, in __call__
return await self._query_func(asyncpg_conn)
File "/home/adm1/cd2/lib/python3.10/site-packages/asyncpg/connection.py", line 1081, in copy_records_to_table
return await self._protocol.copy_in(
File "asyncpg/protocol/protocol.pyx", line 561, in copy_in
File "asyncpg/protocol/protocol.pyx", line 478, in asyncpg.protocol.protocol.BaseProtocol.copy_in
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/plugins/postgres/init_processor.py", line 81, in _convert_records
yield tuple(converter(record) for converter in self._converters)
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/plugins/postgres/init_processor.py", line 81, in <genexpr>
yield tuple(converter(record) for converter in self._converters)
File "/home/adm1/cd2/lib/python3.10/site-packages/dap/conversion_common_json.py", line 82, in <lambda>
return lambda record_json: record_json["value"][column_name]
KeyError: 'content_id'
==================================================================================================
According to 'lib/python3.10/site-packages/dap/conversion_common_json.py', line 82 is checking type_cast is None.
if type_cast is None:
return lambda record_json: record_json["value"][column_name]
Anyone has idea about this?
Thanks