LorenFrankLab / spyglass

Neuroscience data analysis framework for reproducible research built by Loren Frank Lab at UCSF
https://lorenfranklab.github.io/spyglass/
MIT License
94 stars 43 forks source link

Import error for `spikesorting` module #171

Closed khl02007 closed 2 years ago

khl02007 commented 2 years ago

@lfrank: I get this error when I try to import the spike sorting module (now in its own dir). do you not get this? I can push changes to fix but let me know if you'd like to work on it (provided that this isn't something wrong that I'm doing)

Tried:

from nwb_datajoint import spikesorting

Error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 from nwb_datajoint import spikesorting

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/__init__.py:6, in <module>
      1 # Reorganize this into hierarchy
      2 # Note: users will have their own tables... permission system
      3 
      4 #from .spikesorting_metrics import MetricParameters, MetricSelection, QualityMetrics
      5 #from .spikesorting_waveforms import WaveformParameters, WaveformSelection, Waveforms
----> 6 from .sortingview import SortingviewWorkspace
      7 from .spikesorting import (SortGroup, SpikeSorterParameters, SpikeSorting,
      8                            SpikeSortingPreprocessingParameters,
      9                            SpikeSortingRecording,
     10                            SpikeSortingRecordingSelection,
     11                            SpikeSortingSelection)
     12 from .spikesorting_artifact import (ArtifactDetection,
     13                                     ArtifactDetectionParameters,
     14                                     ArtifactDetectionSelection,
     15                                     ArtifactRemovedIntervalList)

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/sortingview.py:9, in <module>
      6 import sortingview as sv
      7 import spikeinterface as si
----> 9 from .spikesorting import SpikeSortingRecording
     10 from .spikesorting_curation import Curation
     12 schema = dj.schema('sortingview')

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/spikesorting.py:509, in <module>
    495         sorter_params = {'detect_sign': -1,
    496                          'adjacency_radius': 100,
    497                          'freq_min': 300,
   (...)
    503                          'detect_threshold': 3,
    504                          'detect_interval': 10}
    505         self.insert1([sorter, sorter_params_name, sorter_params],
    506                      skip_duplicates=True)
--> 509 from .common_artifact import ArtifactRemovedIntervalList  # noqa
    512 @schema
    513 class SpikeSortingSelection(dj.Manual):
    514     definition = """
    515     # Table for holding selection of recording and parameters for each spike sorting run
    516     -> SpikeSortingRecording
   (...)
    520     import_path = "": varchar(200)  # optional path to previous curated sorting output
    521     """

ModuleNotFoundError: No module named 'nwb_datajoint.spikesorting.common_artifact'
lfrank commented 2 years ago

Can you try redoing the module installation with pip install?

On Mar 19, 2022, at 8:06 PM, Kyu Hyun Lee @.***> wrote:

 @lfrank: I get this error when I try to import the spike sorting module (now in its own dir). do you not get this? I can push changes to fix but let me know if you'd like to work on it (provided that this isn't something wrong that I'm doing) ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

@lfrankhttps://urldefense.com/v3/__https://github.com/lfrank__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAjfHgLtsA$: I get this error when I try to import the spike sorting module (now in its own dir). do you not get this? I can push changes to fix but let me know if you'd like to work on it (provided that this isn't something wrong that I'm doing)

Tried:

from nwb_datajoint import spikesorting

Error:


ModuleNotFoundError Traceback (most recent call last) Input In [3], in <cell line: 1>() ----> 1 from nwb_datajoint import spikesorting

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/init.py:6, in 1 # Reorganize this into hierarchy 2 # Note: users will have their own tables... permission system 3 4 #from .spikesorting_metrics import MetricParameters, MetricSelection, QualityMetrics 5 #from .spikesorting_waveforms import WaveformParameters, WaveformSelection, Waveforms ----> 6 from .sortingview import SortingviewWorkspace 7 from .spikesorting import (SortGroup, SpikeSorterParameters, SpikeSorting, 8 SpikeSortingPreprocessingParameters, 9 SpikeSortingRecording, 10 SpikeSortingRecordingSelection, 11 SpikeSortingSelection) 12 from .spikesorting_artifact import (ArtifactDetection, 13 ArtifactDetectionParameters, 14 ArtifactDetectionSelection, 15 ArtifactRemovedIntervalList)

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/sortingview.py:9, in 6 import sortingview as sv 7 import spikeinterface as si ----> 9 from .spikesorting import SpikeSortingRecording 10 from .spikesorting_curation import Curation 12 schema = dj.schema('sortingview')

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/spikesorting.py:509, in 495 sorter_params = {'detect_sign': -1, 496 'adjacency_radius': 100, 497 'freq_min': 300, (...) 503 'detect_threshold': 3, 504 'detect_interval': 10} 505 self.insert1([sorter, sorter_params_name, sorter_params], 506 skip_duplicates=True) --> 509 from .common_artifact import ArtifactRemovedIntervalList # noqa 512 @schema 513 class SpikeSortingSelection(dj.Manual): 514 definition = """ 515 # Table for holding selection of recording and parameters for each spike sorting run 516 -> SpikeSortingRecording (...) 520 import_path = "": varchar(200) # optional path to previous curated sorting output 521 """

ModuleNotFoundError: No module named 'nwb_datajoint.spikesorting.common_artifact'

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/LorenFrankLab/nwb_datajoint/issues/171__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAgfh5IfYA$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABV4PSIFM4R7KBOFROVPHV3VA2IZ3ANCNFSM5RE37HPQ__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAhdF8QByg$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAghrV81DA$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAgPaDYy0w$. You are receiving this because you were mentioned.Message ID: @.***>

lfrank commented 2 years ago

Oh just looked at this more closely. This was my fault it should be spikes wording not common oh. Feel free to make that change I’ve already made it in the one I’m working on. Sorry for the error

On Mar 19, 2022, at 8:16 PM, Frank, Loren @.***> wrote:

 Can you try redoing the module installation with pip install?

On Mar 19, 2022, at 8:06 PM, Kyu Hyun Lee @.***> wrote:

 @lfrank: I get this error when I try to import the spike sorting module (now in its own dir). do you not get this? I can push changes to fix but let me know if you'd like to work on it (provided that this isn't something wrong that I'm doing) ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

@lfrankhttps://urldefense.com/v3/__https://github.com/lfrank__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAjfHgLtsA$: I get this error when I try to import the spike sorting module (now in its own dir). do you not get this? I can push changes to fix but let me know if you'd like to work on it (provided that this isn't something wrong that I'm doing)

Tried:

from nwb_datajoint import spikesorting

Error:


ModuleNotFoundError Traceback (most recent call last) Input In [3], in <cell line: 1>() ----> 1 from nwb_datajoint import spikesorting

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/init.py:6, in 1 # Reorganize this into hierarchy 2 # Note: users will have their own tables... permission system 3 4 #from .spikesorting_metrics import MetricParameters, MetricSelection, QualityMetrics 5 #from .spikesorting_waveforms import WaveformParameters, WaveformSelection, Waveforms ----> 6 from .sortingview import SortingviewWorkspace 7 from .spikesorting import (SortGroup, SpikeSorterParameters, SpikeSorting, 8 SpikeSortingPreprocessingParameters, 9 SpikeSortingRecording, 10 SpikeSortingRecordingSelection, 11 SpikeSortingSelection) 12 from .spikesorting_artifact import (ArtifactDetection, 13 ArtifactDetectionParameters, 14 ArtifactDetectionSelection, 15 ArtifactRemovedIntervalList)

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/sortingview.py:9, in 6 import sortingview as sv 7 import spikeinterface as si ----> 9 from .spikesorting import SpikeSortingRecording 10 from .spikesorting_curation import Curation 12 schema = dj.schema('sortingview')

File ~/repos/nwb_datajoint/src/nwb_datajoint/spikesorting/spikesorting.py:509, in 495 sorter_params = {'detect_sign': -1, 496 'adjacency_radius': 100, 497 'freq_min': 300, (...) 503 'detect_threshold': 3, 504 'detect_interval': 10} 505 self.insert1([sorter, sorter_params_name, sorter_params], 506 skip_duplicates=True) --> 509 from .common_artifact import ArtifactRemovedIntervalList # noqa 512 @schema 513 class SpikeSortingSelection(dj.Manual): 514 definition = """ 515 # Table for holding selection of recording and parameters for each spike sorting run 516 -> SpikeSortingRecording (...) 520 import_path = "": varchar(200) # optional path to previous curated sorting output 521 """

ModuleNotFoundError: No module named 'nwb_datajoint.spikesorting.common_artifact'

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/LorenFrankLab/nwb_datajoint/issues/171__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAgfh5IfYA$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABV4PSIFM4R7KBOFROVPHV3VA2IZ3ANCNFSM5RE37HPQ__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAhdF8QByg$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAghrV81DA$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!LQC6Cpwp!_3H2v5zqgU0Ki0ULoWhOB881YK-hY9s6o1RqlGH-1vw7PbhXHWfkZNIHvAgPaDYy0w$. You are receiving this because you were mentioned.Message ID: @.***>

khl02007 commented 2 years ago

No worries, will try to submit a PR for this.