RASA X Error - Extracting dates using Duckling

So… I use Duckling to extract dates\period that a user wants to make a reservation. When using RASA X, I get the exception below. Its related to the execution of the SQL statement used to make an entry into the nlu_training_data_entity table. Any suggestions on how this can be fixed??

Exception occurred while handling uri: ‘http://localhost:5002/api/conversations/0bb2a401409148c2825efd8a64bed046/events’ Traceback (most recent call last): File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 1244, in _execute_context cursor, statement, parameters, context File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\default.py”, line 550, in do_execute cursor.execute(statement, parameters) sqlite3.InterfaceError: Error binding parameter 2 - probably unsupported type.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sanic\app.py”, line 917, in handle_request response = await response File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\api\decorators.py”, line 176, in decorated_function return await await_and_return_response(args, kwargs, request) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\api\decorators.py”, line 106, in await_and_return_response response = await response File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\api\decorators.py”, line 46, in decorated_function return await response File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\api\blueprints\stack.py”, line 255, in post_event user, config.project_name, _event File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\services\data_service.py”, line 280, in save_user_event_as_example return self.save_example(user[“username”], project_id, example) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\services\data_service.py”, line 250, in save_example self.flush() # flush to get the example id File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\database\service.py”, line 31, in flush self.session.flush() File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\session.py”, line 2458, in flush self._flush(objects) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\session.py”, line 2596, in _flush transaction.rollback(_capture_exception=True) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\util\langhelpers.py”, line 68, in exit compat.reraise(exc_type, exc_value, exc_tb) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\util\compat.py”, line 129, in reraise raise value File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\session.py”, line 2556, in _flush flush_context.execute() File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\unitofwork.py”, line 422, in execute rec.execute(self) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\unitofwork.py”, line 589, in execute uow, File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\persistence.py”, line 245, in save_obj insert, File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\persistence.py”, line 1120, in _emit_insert_statements statement, params File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 988, in execute return meth(self, multiparams, params) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\sql\elements.py”, line 287, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 1107, in _execute_clauseelement distilled_params, File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 1248, in _execute_context e, statement, parameters, cursor, context File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 1466, in _handle_dbapi_exception util.raise_from_cause(sqlalchemy_exception, exc_info) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\util\compat.py”, line 383, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\util\compat.py”, line 128, in reraise raise value.with_traceback(tb) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 1244, in _execute_context cursor, statement, parameters, context File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\default.py”, line 550, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 2 - probably unsupported type. [SQL: INSERT INTO nlu_training_data_entity (example_id, entity, value, start, “end”, extractor) VALUES (?, ?, ?, ?, ?, ?)] [parameters: (209, ‘time’, {‘to’: ‘2019-10-10T00:00:00.000-07:00’, ‘from’: ‘2019-10-02T00:00:00.000-07:00’}, 29, 51, ‘DucklingHTTPExtractor’)] (Background on this error at: http://sqlalche.me/e/rvf5) Exception occurred in one of response middleware handlers Traceback (most recent call last): File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sanic\app.py”, line 958, in handle_request request, response File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\spf\framework.py”, line 535, in _run_response_middleware _response = await _response File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\rasax\community\database\utils.py”, line 125, in remove_session db_session.commit() File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\session.py”, line 1026, in commit self.transaction.commit() File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\session.py”, line 491, in commit self._assert_active(prepared_ok=True) File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\orm\session.py”, line 294, in _assert_active % self._rollback_exception sqlalchemy.exc.InvalidRequestError: This Session’s transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.InterfaceError) Error binding parameter 2 - probably unsupported type. [SQL: INSERT INTO nlu_training_data_entity (example_id, entity, value, start, “end”, extractor) VALUES (?, ?, ?, ?, ?, ?)] [parameters: (209, ‘time’, {‘to’: ‘2019-10-10T00:00:00.000-07:00’, ‘from’: ‘2019-10-02T00:00:00.000-07:00’}, 29, 51, ‘DucklingHTTPExtractor’)] (Background on this error at: http://sqlalche.me/e/rvf5) Exception occurred while handling uri: ‘http://localhost:5002/api/conversations/0bb2a401409148c2825efd8a64bed046/events’ Traceback (most recent call last): File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\base.py”, line 1244, in _execute_context cursor, statement, parameters, context File “c:\users\user1\appdata\local\continuum\anaconda3\envs\botv6\lib\site-packages\sqlalchemy\engine\default.py”, line 550, in do_execute cursor.execute(statement, parameters) sqlite3.InterfaceError: Error binding parameter 2 - probably unsupported type.