Hi,
I have a mysql database set up. The name of the database is ‘prodigy’
db.add_dataset(‘test_dataset’) works fine.
But when I try db.get_dataset(‘test_dataset’) or db.drop_dataset(‘test_dataset’),
I get the below error:
Traceback (most recent call last):
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 3830, in execute_sql
cursor.execute(sql, params or ())
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute
result = self._query(query)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result
result.read()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read
first_packet = self.connection._read_packet()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1014, in _read_packet
packet.check_error()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 393, in check_error
err.raise_mysql_exception(self._data)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table 'prodigy.link' doesn't exist")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/prodigy/components/db.py", line 231, in get_dataset
.where(Dataset.id == dataset.id)).execute()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 3274, in execute
self._qr = ResultWrapper(model_class, self._execute(), query_meta)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 2939, in _execute
return self.database.execute_sql(sql, params, self.require_commit)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 3837, in execute_sql
self.commit()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 3656, in __exit__
reraise(new_type, new_type(*exc_args), traceback)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 135, in reraise
raise value.with_traceback(tb)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/peewee.py", line 3830, in execute_sql
cursor.execute(sql, params or ())
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute
result = self._query(query)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result
result.read()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read
first_packet = self.connection._read_packet()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 1014, in _read_packet
packet.check_error()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/connections.py", line 393, in check_error
err.raise_mysql_exception(self._data)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
peewee.ProgrammingError: (1146, "Table 'prodigy.link' doesn't exist")
Thank you!