I am trying to run
plsql = """
DECLARE
l_zip BLOB;
BEGIN
l_zip := apex_export.zip( p_source_files => apex_export.get_workspace(:1),
p_extra_files => apex_t_export_files( apex_t_export_file( name => 'README.md', contents => 'Merch Read Write Workspace Contents.'),
apex_t_export_file( name => 'LICENSE.txt', contents => 'The Universal Permissive License (UPL), Version 1.0'))
);
:2 := l_zip;
END;
"""
zip_var = cursor.var(oracledb.DB_TYPE_BLOB)
cursor.execute(plsql, [workspace_id, zip_var])
with open("workspace_export.zip", "wb") as f:
f.write(zip_data)
I always get the error
oracledb.exceptions.NotSupportedError: DPY-3002: Python value of type "tuple" is not supported
in the line cursor.execute(plsql, [workspace_id, zip_var])
print()
(andprint(type(...))
,print(len(...))
, etc.) to see which part of code is executed and what you really have in variables. It is called"print debugging"
and it helps to see what code is really doing.