Hey @stephens,
Thank you for your reply. I changed the file into a JSON file and updated it on the github repo as well (under the data directory). Even after Rasa X completed syncing with the git server, I’m seeing an empty training space and I’m still unable to upload it using the button.
I checked the logs and this is what I think the problem is:
rasa-x_1 | [SQL: INSERT INTO nlu_training_data_entity (example_id, entity, value, original_value, start, "end", extractor, entity_synonym_id) VALUES (%(ex
ample_id)s, %(entity)s, %(value)s, %(original_value)s, %(start)s, %(end)s, %(extractor)s, %(entity_synonym_id)s) RETURNING nlu_training_data_entity.id]
rasa-x_1 | [parameters: {'example_id': 14072, 'entity': 'dispatch_request_data', 'value': '{"service_type":"Break Fix","sub_service_type":"parts_and_labou
r","service_tag":"1133MBX","env":"ge2","primary_contact":{"first_name":"","last_name": ... (284 characters truncated) ... ","DSPType":"","ClassType":"","DSP":"","pa
rts":{"number":"integer","quantity_to_order":"integer","quantity_to_return":"integer","partusednew":"New"}}', 'original_value': '{"service_type":"Break Fix","sub_se
rvice_type":"parts_and_labour","service_tag":"1133MBX","env":"ge2","primary_contact":{"first_name":"","last_name": ... (284 characters truncated) ... ","DSPType":""
,"ClassType":"","DSP":"","parts":{"number":"integer","quantity_to_order":"integer","quantity_to_return":"integer","partusednew":"New"}}', 'start': 37, 'end': 619, '
extractor': None, 'entity_synonym_id': None}]
rasa-x_1 | (Background on this error at: http://sqlalche.me/e/9h9h)
rasa-x_1 | Exception occurred while handling uri: 'http://35.240.255.248/api/projects/default/data'
rasa-x_1 | Traceback (most recent call last):
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
rasa-x_1 | cursor, statement, parameters, context
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
rasa-x_1 | cursor.execute(statement, parameters)
rasa-x_1 | psycopg2.errors.StringDataRightTruncation: value too long for type character varying(255)
rasa-x_1 |
rasa-x_1 |
rasa-x_1 | The above exception was the direct cause of the following exception:
rasa-x_1 |
rasa-x_1 | Traceback (most recent call last):
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 976, in handle_request
rasa-x_1 | response = await response
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 205, in decorated_function
rasa-x_1 | return await await_and_return_response(args, kwargs, request)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 135, in await_and_return_response
rasa-x_1 | response = await response
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 42, in decorated_function
rasa-x_1 | return await f(request, user=user, *args, **kwargs)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/api/blueprints/nlu.py", line 386, in training_data_bulk
rasa-x_1 | data_service.replace_data(project_id, rjs, RASA, user["username"])
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1565, in replace_data
rasa-x_1 | project_id, data, data_format, username, filename, dump_data
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1726, in save_bulk_data
rasa-x_1 | self._add_intents_and_entities_to_domain(examples, project_id)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 400, in _add_intents_and_entities_to_domain
rasa-x_1 | self._add_items_to_domain(entities, intents, project_id)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 424, in _add_items_to_domain
rasa-x_1 | origin="NLU training data",
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/domain_service.py", line 512, in add_items_to_domain
rasa-x_1 | domain = self._get_or_create_domain(project_id)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/domain_service.py", line 190, in _get_or_create_domain
rasa-x_1 | domain = self._get_domain(project_id)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/rasax/community/services/domain_service.py", line 146, in _get_domain
rasa-x_1 | return self.query(Domain).filter(Domain.project_id == project_id).first()
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3298, in first
rasa-x_1 | ret = list(self[0:1])
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3076, in __getitem__
rasa-x_1 | return list(res)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3402, in __iter__
rasa-x_1 | self.session._autoflush()
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 1602, in _autoflush
rasa-x_1 | util.raise_(e, with_traceback=sys.exc_info()[2])
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
rasa-x_1 | raise exception
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 1591, in _autoflush
rasa-x_1 | self.flush()
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2496, in flush
rasa-x_1 | self._flush(objects)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2637, in _flush
rasa-x_1 | transaction.rollback(_capture_exception=True)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__
rasa-x_1 | exc_value, with_traceback=exc_tb,
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
rasa-x_1 | raise exception
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2597, in _flush
rasa-x_1 | flush_context.execute()
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rasa-x_1 | rec.execute(self)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
rasa-x_1 | uow,
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
rasa-x_1 | insert,
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1136, in _emit_insert_statements
rasa-x_1 | statement, params
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 984, in execute
rasa-x_1 | return meth(self, multiparams, params)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 293, in _execute_on_connection
rasa-x_1 | return connection._execute_clauseelement(self, multiparams, params)
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1103, in _execute_clauseelement
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1288, in _execute_context
rasa-x_1 | e, statement, parameters, cursor, context
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1482, in _handle_dbapi_exception
rasa-x_1 | sqlalchemy_exception, with_traceback=exc_info[2], from_=e
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
rasa-x_1 | raise exception
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
rasa-x_1 | cursor, statement, parameters, context
rasa-x_1 | File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
rasa-x_1 | cursor.execute(statement, parameters)
rasa-x_1 | sqlalchemy.exc.DataError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurrin
g prematurely)
rasa-x_1 | (psycopg2.errors.StringDataRightTruncation) value too long for type character varying(255)`
Does the ‘(psycopg2.errors.StringDataRightTruncation) value too long for type character varying(255)’ error mean that my file is too large or that the individual examples are too large? And how can I fix this error? One way would be to manually add all the examples on Rasa X using the UI but that would be too time consuming for me.
Thanks!