I started seeing this error message.
The MySQL database has no custom modifications.
Could you please help me?
Prodigy Version: 1.12.4
Database: MySQL
Error Message on save:
Error message in the server:
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/cors.py", line 147, in simple_response
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: await self.app(scope, receive, send)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: raise exc
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: await self.app(scope, receive, sender)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: raise e
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: await self.app(scope, receive, send)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 718, in __call__
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: await route.handle(scope, receive, send)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 276, in handle
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: await self.app(scope, receive, send)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 66, in app
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: response = await func(request)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/fastapi/routing.py", line 237, in app
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: raw_response = await run_endpoint_function(
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/fastapi/routing.py", line 165, in run_endpoint_function
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return await run_in_threadpool(dependant.call, **values)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/starlette/concurrency.py", line 41, in run_in_threadpool
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return await anyio.to_thread.run_sync(func, *args)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 33, in run_sync
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return await get_asynclib().run_sync_in_worker_thread(
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return await future
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: result = context.run(func, *args)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/prodigy/app.py", line 572, in give_answers
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: controller.receive_answers(
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "cython_src/prodigy/core.pyx", line 540, in prodigy.core.Controller.receive_answers
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "cython_src/prodigy/core.pyx", line 557, in prodigy.core.Controller.receive_answers
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "cython_src/prodigy/core.pyx", line 657, in prodigy.core.Controller._db_add_examples
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/prodigy/components/db.py", line 770, in add_examples
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: self.link(dataset, ids)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/prodigy/components/db.py", line 786, in link
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: Link.bulk_create(links, batch_size=batch_size)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 6609, in bulk_create
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: res = cls.insert_many(accum, fields=fields).execute()
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 1966, in inner
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return method(self, database, *args, **kwargs)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 2037, in execute
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return self._execute(database)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 2842, in _execute
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return super(Insert, self)._execute(database)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 2555, in _execute
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: cursor = database.execute(self)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3254, in execute
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: return self.execute_sql(sql, params)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3246, in execute_sql
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: cursor.execute(sql, params or ())
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3014, in __exit__
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: reraise(new_type, new_type(exc_value, *exc_args), traceback)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 192, in reraise
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: raise value.with_traceback(tb)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/peewee.py", line 3246, in execute_sql
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: cursor.execute(sql, params or ())
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/cursors.py", line 153, in execute
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: result = self._query(query)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/cursors.py", line 322, in _query
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: conn.query(q)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/connections.py", line 558, in query
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: self._affected_rows = self._read_query_result(unbuffered=unbuffered)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/connections.py", line 822, in _read_query_result
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: result.read()
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/connections.py", line 1200, in read
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: first_packet = self.connection._read_packet()
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/connections.py", line 772, in _read_packet
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: packet.raise_for_error()
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/protocol.py", line 221, in raise_for_error
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: err.raise_mysql_exception(self._data)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: File "/usr/local/lib/python3.9/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: raise errorclass(errno, errval)
Jul 28 13:10:41 ip-172-31-85-61 prodigy_stt[4093767]: peewee.IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`prodigy_stt`.`link`, CONSTRAINT `link_ibfk_1` FOREIGN KEY (`example_id`) REFERENCES `example` (`id`))')