datajoint / datajoint-python

Relational data pipelines for the science lab
https://datajoint.com/docs
GNU Lesser General Public License v2.1
163 stars 83 forks source link

Error during distributed computing populaution #1097

Open foustgeorge opened 1 year ago

foustgeorge commented 1 year ago

Hello,

I am experiencing an issue with the distributed computation option in Datajoint. Especially I am trying to run the command

lsensGF.ComputeFISSA.populate(reserve_jobs =True)

after I have cleaned the the lsensGF.schema.jobs() matrix with lsensGF.schema.jobs.drop() and what I am getting is this error:

MissingAttributeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_17976/3092192623.py in ----> 1 lsensGF.ComputeFISSA.populate(reserve_jobs =True)

C:\ProgramData\Anaconda3\lib\site-packages\datajoint\autopopulate.py in populate(self, suppress_errors, return_exception_objects, reserve_jobs, order, limit, max_calls, display_progress, *restrictions) 146 if max_calls is not None and call_count >= max_calls: 147 break --> 148 if not reserve_jobs or jobs.reserve(self.target.table_name, self._job_key(key)): 149 self.connection.start_transaction() 150 if key in self.target: # already populated

C:\ProgramData\Anaconda3\lib\site-packages\datajoint\jobs.py in reserve(self, table_name, key) 79 try: 80 with config(enable_python_native_blobs=True): ---> 81 self.insert1(job, ignore_extra_fields=True) 82 except DuplicateError: 83 return False

C:\ProgramData\Anaconda3\lib\site-packages\datajoint\table.py in insert1(self, row, kwargs) 173 For kwargs, see insert() 174 """ --> 175 self.insert((row,), kwargs) 176 177 def insert(self, rows, replace=False, skip_duplicates=False, ignore_extra_fields=False, allow_direct_insert=None):

C:\ProgramData\Anaconda3\lib\site-packages\datajoint\table.py in insert(self, rows, replace, skip_duplicates, ignore_extra_fields, allow_direct_insert) 344 duplicate=(' ON DUPLICATE KEY UPDATE {pk}={pk}'.format(pk=self.primary_key[0]) 345 if skip_duplicates else '')) --> 346 self.connection.query(query, args=list( 347 itertools.chain.from_iterable((v for v in r['values'] if v is not None) for r in rows))) 348 except UnknownAttributeError as err:

C:\ProgramData\Anaconda3\lib\site-packages\datajoint\connection.py in query(self, query, args, as_dict, suppress_warnings, reconnect) 212 cursor = self._conn.cursor(cursor=cursor_class) 213 try: --> 214 self._execute_query(cursor, query, args, cursor_class, suppress_warnings) 215 except errors.LostConnectionError: 216 if not reconnect:

C:\ProgramData\Anaconda3\lib\site-packages\datajoint\connection.py in _execute_query(cursor, query, args, cursor_class, suppress_warnings) 194 cursor.execute(query, args) 195 except client.err.Error as err: --> 196 raise translate_query_error(err, query) from None 197 198 def query(self, query, args=(), *, as_dict=False, suppress_warnings=True, reconnect=None):

MissingAttributeError: Field 'error_message' doesn't have a default value

This happens in all of the computers having access to the same Datajoint server making the distributed computation not possible.

I am running the latest version of Datajoint in Windows 10 with Python 3.8

Can you please help me to get over this problem?

Thanks a lot in advance, Georgios

kabilar commented 1 year ago

Hi @foustgeorge, I have not seen this error before. Was this previously working for you? As a related aside, when clearing the jobs table I would suggest using delete instead of drop. Perhaps this is easier to debug in a joint coding session. If you would like, please schedule a 30 minute meeting - scheduling link.

foustgeorge commented 1 year ago

Hello,

Thank you for your reply.

I have the feeling that somehow I mixed the commands and I did .drop() instead of .delete() and that's when the error appeared.

I have booked a coding session with you tomorrow so that we can have a look together.

Thank you very much.

Best, Georgios

2023年6月29日(木) 3:11 Kabilar Gunalan @.***>:

Hi @foustgeorge https://github.com/foustgeorge, I have not seen this error before. Was this previously working for you? As a related aside, when clearing the jobs table I would suggest using delete instead of drop. Perhaps this is easier to debug in joint coding session. If you would like, please schedule a 30 minute meeting - scheduling link https://meetings.hubspot.com/kabilar.

— Reply to this email directly, view it on GitHub https://github.com/datajoint/datajoint-python/issues/1097#issuecomment-1612295305, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZEF35KYIMGVW37BP7K4X3XNTI3HANCNFSM6AAAAAAZWWNQOE . You are receiving this because you were mentioned.Message ID: @.***>

-- Georgios Foustoukos, +41 788060490 MSc in Life Sciences and Technologies École polytechnique fédérale de Lausanne (EPFL)

kabilar commented 1 year ago

Sounds great. Thanks.