Skip to content

error in foraging.data_to_change_detection_core #563

Open

Description

@farznaj

@jeromelecoq

session_id: 855711263
experiment: 856123117
(mesoscope session ; The workflow for the experiment is QC).

I get the error below when running the convert code. Any thoughts?

File "", line 2, in
ophys_data = convert_level_1_to_level_2(experiment_id, cache_dir) #, plot_roi_validation=False);

File "/home/farzaneh/Documents/analysis_codes/visual_behavior_analysis/visual_behavior/ophys/io/convert_level_1_to_level_2.py", line 976, in convert_level_1_to_level_2
core_data = get_core_data(pkl, timestamps_stimulus)

File "/home/farzaneh/Documents/analysis_codes/visual_behavior_analysis/visual_behavior/ophys/io/convert_level_1_to_level_2.py", line 415, in get_core_data
core_data = foraging.data_to_change_detection_core(pkl, time=timestamps_stimulus)

File "/home/farzaneh/Documents/analysis_codes/visual_behavior_analysis/visual_behavior/translator/foraging/init.py", line 40, in data_to_change_detection_core
handler = ListHandler(log_messages)

File "/home/farzaneh/Documents/analysis_codes/visual_behavior_analysis/visual_behavior/utilities.py", line 174, in init
super(ListHandler, self).init()

TypeError: super(type, obj): obj must be an instance or subtype of type

Activity

  1. nickponvert commented on May 21, 2019

    @nickponvert
    Contributor

    @farznaj this looks like the same error you were getting after you switched to the fix/issue533 branch to try and debug #562, is this still on that same branch?

  2. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    @nickponvert I know... no I am not ... I'm on feature/ production

  3. nickponvert commented on May 21, 2019

    @nickponvert
    Contributor

    Ok I'm going to try and reproduce it.

  4. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    I am getting this error for more sessions now:
    session_id: 850894918
    One point that might be helpful is that this session is just fixed by LIMS folks in service now .....
    what's going on? is it about pkl files?

  5. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    @nickponvert Same error with two experiments (from session_id: 851428829) that had issues with motion correction, and just got fixed by LIMS people....

  6. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    @jeromelecoq @nickponvert I am in a python environment, after I check out a new git branch, for the codes to take effect, do I need to restart my python session? I am just surprised that why I used to get a platform_info error on feature/production ... and a type error on fix/issue533 .... but I am not back to feature branch , however I am getting the same error as in fix branch ....

    there is something, I am up to date with new git changes (did git pull very recently) ... I cant remember if the platform error was before I did git pull or after .... is there a chance that feature codes are updated to what was in fix branch, and hence I am getting a similar type of error now on feature branch?

    or is it that somehow I am not running feature branch code, even though I am in it (based on git branch start indication)....

  7. jeromelecoq commented on May 21, 2019

    @jeromelecoq
    Contributor

    Yes, I usually restart my kernel when I update a package.
    You can also use the reload function
    https://www.geeksforgeeks.org/reloading-modules-python/

  8. nickponvert commented on May 21, 2019

    @nickponvert
    Contributor

    @farznaj that fix branch hasn't yet been merged into production analysis, so that shouldn't be the issue. Would you copy/paste the code you are running to get the error? It would be helpful for me to debug the other issue in the fix branch too

  9. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    I found this that might be helpful:
    https://thomas-cokelaer.info/blog/2011/09/382/
    The error happens on super function below: (I've already sent the exact files).

    class ListHandler(logging.Handler):
    """docstring for ListHandler."""
    def init(self, log_list):
    super(ListHandler, self).init()
    self.log_list = log_list

    def emit(self, record):
        entry = self.format(record)
        self.log_list.append(entry)
    
  10. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    thanks @jeromelecoq
    @nickponvert after restarting the kernel, now the error changes back to platform_info .... the interesting thing is that all these sessions that just got fixed by lims folks (which initially had segmentation problems), are now failing due to this platform error....

  11. farznaj commented on May 21, 2019

    @farznaj
    ContributorAuthor

    @nickponvert update: after restarting the kernel, the newly fixed sessions (by lims folks) are working... the only failed sessions are the ones that I originally sent you about the platform error:
    session_id:

    845444695

    846652517

  12. nickponvert commented on Jan 22, 2020

    @nickponvert
    Contributor

    @farznaj since the feature/production_analysis branch got merged into master (master should now be the default branch for all analysis) could we re-check this issue to see if it is still a problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions