You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying cautious delete with the TrodesPosV1 table, it reported a "'TableChain' object has no attribute 'join'" error. I couldn't find a join method in the TableChain class, so was wondering if this is a general problem of how TableChain was defined in dj_graph.py. How could I fix this? To Reproduce
import spyglass.position as sgp
(sgp.v1.TrodesPosV1()&{'nwb_file_name':'BraveLu20240513_.nwb'}).cautious_delete()
Error Stack
---------------------------------------------------------------------------AttributeErrorTraceback (mostrecentcalllast)
CellIn [20], line21###### Delete the position tables if they were incorrect.---->2 (sgp.v1.TrodesPosV1()&{'nwb_file_name':nwb_copy_file_name}).delete()
File~/code/spyglass/src/spyglass/utils/dj_mixin.py:649, inSpyglassMixin.delete(self, force_permission, *args, **kwargs)
647defdelete(self, force_permission=False, *args, **kwargs):
648"""Alias for cautious_delete, overwrites datajoint.table.Table.delete"""-->649self.cautious_delete(force_permission=force_permission, *args, **kwargs)
File~/code/spyglass/src/spyglass/utils/dj_mixin.py:610, inSpyglassMixin.cautious_delete(self, force_permission, *args, **kwargs)
607start=time()
609ifnotforce_permission:
-->610self._check_delete_permission()
612merge_deletes=self.delete_downstream_merge(
613dry_run=True,
614disable_warning=True,
615return_parts=False,
616 )
618safemode= (
619dj.config.get("safemode", True)
620ifkwargs.get("safemode") isNone621elsekwargs["safemode"]
622 )
File~/code/spyglass/src/spyglass/utils/dj_mixin.py:534, inSpyglassMixin._check_delete_permission(self)
527logger.warn( # Permit delete if no session connection528"Could not find lab team associated with "529+f"{self.__class__.__name__}."530+"\nBe careful not to delete others' data."531 )
532return-->534sess_summary=self._get_exp_summary()
535experimenters=sess_summary.fetch(self._member_pk)
536ifNoneinexperimenters:
File~/code/spyglass/src/spyglass/utils/dj_mixin.py:479, inSpyglassMixin._get_exp_summary(self)
476format=dj.U(self._session_pk, self._member_pk)
478restr=self.restrictionorTrue-->479sess_link=self._session_connection.join(restr, reverse_order=True)
481exp_missing=format& (sess_link-SesExp).proj(**empty_pk)
482exp_present=format& (sess_link*SesExp-exp_missing).proj()
AttributeError: 'TableChain'objecthasnoattribute'join'
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying cautious delete with the TrodesPosV1 table, it reported a "
'TableChain' object has no attribute 'join'
" error. I couldn't find a join method in the TableChain class, so was wondering if this is a general problem of how TableChain was defined in dj_graph.py. How could I fix this?To Reproduce
Error Stack
The text was updated successfully, but these errors were encountered: