There's a typo in the script:
L27:
raw_r.inventories.insert_recort_stream(stream)
should be:
raw_r.inventories.insert_record_stream(stream)
There's a typo in the script:
L27:
raw_ r.inventories. insert_ recort_ stream( stream)
should be:
raw_ r.inventories. insert_ record_ stream( stream)