1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] datajoint seems to require schemas to have the same values at shared *secondary*...

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    When trying to join two datajoint tables that have the same values for a primary attribute but different values for a shared secondary attribute ("sweep_key") I am getting this error:

    Traceback (most recent call last):

    Cell In[199], line 1 dj_classes'PatchNeuron'*timepoints

    File ~/opt/anaconda3/envs/spyder-env/lib/python3.12/site-packages/datajoint/expression.py:259 in mul return self.join(other)

    File ~/opt/anaconda3/envs/spyder-env/lib/python3.12/site-packages/datajoint/expression.py:285 in join assert_join_compatibility(self, other)

    File ~/opt/anaconda3/envs/spyder-env/lib/python3.12/site-packages/datajoint/condition.py:71 in assert_join_compatibility raise DataJointError(

    DataJointError: Cannot join query expressions on dependent attribute sweep_key

    I think this maybe the same issue as described here: Does datajoint "join" operator require tables to have the same value at shared secondary attributes?

    And subsequently said to be fixed here: https://github.com/datajoint/datajoint-python/pull/981

    Has anyone run into this? Do you have advice or work arounds? The one listed on the original Stackoverflow post did not work for me.

    Thanks so much!

    Tried: Work around listed on previous post

    @property def key_source(self): return PatchNeuron.proj() * PatchNeuronTimepoints

    where PatchNeuron and PatchNeuronTimepoints are the two tables I'm trying to join.

    When I remove the secondary attribute sweep_key, the tables join just fine.

    Continue reading...

Compartilhe esta Página