Answer the question
In order to leave comments, you need to log in
What is streaming mode in Python?
I can't figure out the documentation for FireBird.
I need to understand how binary blobs are inserted, but the examples say:
Materialized
Streamed
And then instead of reading the file they write:
cur.execute("insert into blob_test values (?)", ('abcdef',) )
How can I upload a file here?
I do:
output_file_name_read = open(output_file_name,'rb').read()
currDst.execute("""UPDATE "REQUESTS" SET shape = {0} WHERE request_id = 2""" % output_file_name_read)
File "C:\work\App.py", line 70, in <module>
main()
File "C:\work\App.py", line 67, in main
SyncRequest(postconn, fireconn, 'POSTID', 'FIREID')
File "C:\work\App.py", line 52, in SyncRequest
currDst.execute("""UPDATE "REQUESTS" SET shape = {0} WHERE request_id = 2""" % output_file_name_read)
TypeError: not all arguments converted during string formatting
Answer the question
In order to leave comments, you need to log in
(output_file_name_read) is not a tuple
(output_file_name_read,) is a tuple
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question