The current error message gives "Asynchronous scanning is not supported by SyncScanner"
Copying the comment of westonpace:
In Python it is always use_async=True. In R the scanner is hidden from the user on dataset writes but the option there is use_async as well. In C++ the option is UseAsync in the ScannerBuilder. How about,
"Writing datasets requires that the input scanner is configured to scan asynchronously via the use_async or UseAsync options."