Closed MichaelCoulter closed 2 years ago
Can you check your environment variables?
On Jul 15, 2022, at 6:48 PM, MichaelCoulter @.***> wrote:
This is the error I get when trying to run ss.SortingviewWorkspace.populate() with the current code. I think I'm just doing something wrong, but I'm not sure how to fix this. Thanks. Exception Traceback (most recent call last) ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
This is the error I get when trying to run ss.SortingviewWorkspace.populate() with the current code. I think I'm just doing something wrong, but I'm not sure how to fix this. Thanks.
Exception Traceback (most recent call last) Input In [5], in <cell line: 6>() 23 ## add to sortingview workspace for manual curation 24 ss.SortingviewWorkspaceSelection.insert1(auto_curation_out_key, skip_duplicates=True) ---> 25 ss.SortingviewWorkspace.populate(auto_curation_out_key) 26 print('Tetrode', tetrode+1, ss.SortingviewWorkspace().url(auto_curation_out_key)) 28 # Populate CuratedSpikeSorting
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/datajoint/autopopulate.py:230, in AutoPopulate.populate(self, suppress_errors, return_exception_objects, reserve_jobs, order, limit, max_calls, display_progress, processes, make_kwargs, *restrictions) 226 if processes == 1: 227 for key in ( 228 tqdm(keys, desc=self.class.name) if display_progress else keys 229 ): --> 230 error = self._populate1(key, jobs, **populate_kwargs) 231 if error is not None: 232 error_list.append(error)
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/datajoint/autopopulate.py:281, in AutoPopulate._populate1(self, key, jobs, suppress_errors, return_exception_objects, make_kwargs) 279 self.class._allow_insert = True 280 try: --> 281 make(dict(key), **(make_kwargs or {})) 282 except (KeyboardInterrupt, SystemExit, Exception) as error: 283 try:
File ~/spyglass/src/spyglass/spikesorting/sortingview.py:63, in SortingviewWorkspace.make(self, key) 60 google_user_ids.append(google_user_id[0]) 62 # do ---> 63 workspace_uri, recording_id, sorting_id = _create_spikesortingview_workspace(recording_path=recording_path, 64 sorting_path=sorting_path, 65 merge_groups=merge_groups, 66 workspace_label=workspace_label, 67 recording_label=recording_label, 68 sorting_label=sorting_label, 69 metrics=metrics, 70 curation_labels=curation_labels, 71 google_user_ids=google_user_ids) 73 # insert 74 key['workspace_uri'] = workspace_uri
File ~/spyglass/src/spyglass/spikesorting/sortingview_helper_fn.py:76, in _create_spikesortingview_workspace(recording_path, sorting_path, merge_groups, workspace_label, recording_label, sorting_label, metrics, google_user_ids, curation_labels) 72 def _create_spikesortingview_workspace(recording_path: str, sorting_path: str, merge_groups: List[List[int]], 73 workspace_label: str, recording_label: str, sorting_label: str, 74 metrics: dict=None, google_user_ids: List=None, curation_labels: dict=None): ---> 76 workspace = sv.create_workspace(label=workspace_label) 78 recording = si.load_extractor(recording_path) 79 if recording.get_num_segments() > 1:
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/sortingview/workspace/create_workspace.py:7, in create_workspace(label) 6 def create_workspace(*, label: Union[str, None]): ----> 7 feed = kcl.create_feed() 8 feed_id = feed.feed_id 9 workspace_uri = f'sortingview-workspace:{feed_id}'
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/kachery_cloud/feeds/create_feed.py:6, in create_feed(project_id) 5 def create_feed(*, project_id: Union[str, None]=None): ----> 6 return Feed.create(project_id=project_id)
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/kachery_cloud/feeds/Feed.py:76, in Feed.create(project_id) 74 else: 75 payload['projectId'] = get_project_id() ---> 76 response = _kacherycloud_request(payload) 77 feed_id = response['feedId'] 78 project_id = response['projectId']
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/kachery_cloud/_kacherycloud_request.py:27, in _kacherycloud_request(request_payload) 25 resp = requests.post(url, json=req) 26 if resp.status_code != 200: ---> 27 raise Exception(f'Error in {payload["type"]} ({resp.status_code}) {resp.reason}: {resp.text}') 28 response = resp.json() 29 return response
Exception: Error in createFeed (500) Internal Server Error: Error: Invalid kacherycloud request
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/LorenFrankLab/spyglass/issues/298__;!!LQC6Cpwp!rq45FqRDFBHfwE9cdxM-JXhPrUBNG1wfdaIkUTzgm8w7t7niKjHhAh2nJeIUFzV4QrXxBsc5tvxUpJeQg2UQRytXXA$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABV4PSO6J5MZJAMIC3CRK7TVUIIEJANCNFSM53XIVT4Q__;!!LQC6Cpwp!rq45FqRDFBHfwE9cdxM-JXhPrUBNG1wfdaIkUTzgm8w7t7niKjHhAh2nJeIUFzV4QrXxBsc5tvxUpJeQg2U8og4hnA$. You are receiving this because you are subscribed to this thread.Message ID: @.***>
This is the error I get when trying to run ss.SortingviewWorkspace.populate() with the current code. I think I'm just doing something wrong, but I'm not sure how to fix this. Thanks.
Exception Traceback (most recent call last) Input In [5], in <cell line: 6>() 23 ## add to sortingview workspace for manual curation 24 ss.SortingviewWorkspaceSelection.insert1(auto_curation_out_key, skip_duplicates=True) ---> 25 ss.SortingviewWorkspace.populate(auto_curation_out_key) 26 print('Tetrode', tetrode+1, ss.SortingviewWorkspace().url(auto_curation_out_key)) 28 # Populate CuratedSpikeSorting
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/datajoint/autopopulate.py:230, in AutoPopulate.populate(self, suppress_errors, return_exception_objects, reserve_jobs, order, limit, max_calls, display_progress, processes, make_kwargs, *restrictions) 226 if processes == 1: 227 for key in ( 228 tqdm(keys, desc=self.class.name) if display_progress else keys 229 ): --> 230 error = self._populate1(key, jobs, **populate_kwargs) 231 if error is not None: 232 error_list.append(error)
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/datajoint/autopopulate.py:281, in AutoPopulate._populate1(self, key, jobs, suppress_errors, return_exception_objects, make_kwargs) 279 self.class._allow_insert = True 280 try: --> 281 make(dict(key), **(make_kwargs or {})) 282 except (KeyboardInterrupt, SystemExit, Exception) as error: 283 try:
File ~/spyglass/src/spyglass/spikesorting/sortingview.py:63, in SortingviewWorkspace.make(self, key) 60 google_user_ids.append(google_user_id[0]) 62 # do ---> 63 workspace_uri, recording_id, sorting_id = _create_spikesortingview_workspace(recording_path=recording_path, 64 sorting_path=sorting_path, 65 merge_groups=merge_groups, 66 workspace_label=workspace_label, 67 recording_label=recording_label, 68 sorting_label=sorting_label, 69 metrics=metrics, 70 curation_labels=curation_labels, 71 google_user_ids=google_user_ids) 73 # insert 74 key['workspace_uri'] = workspace_uri
File ~/spyglass/src/spyglass/spikesorting/sortingview_helper_fn.py:76, in _create_spikesortingview_workspace(recording_path, sorting_path, merge_groups, workspace_label, recording_label, sorting_label, metrics, google_user_ids, curation_labels) 72 def _create_spikesortingview_workspace(recording_path: str, sorting_path: str, merge_groups: List[List[int]], 73 workspace_label: str, recording_label: str, sorting_label: str, 74 metrics: dict=None, google_user_ids: List=None, curation_labels: dict=None): ---> 76 workspace = sv.create_workspace(label=workspace_label) 78 recording = si.load_extractor(recording_path) 79 if recording.get_num_segments() > 1:
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/sortingview/workspace/create_workspace.py:7, in create_workspace(label) 6 def create_workspace(*, label: Union[str, None]): ----> 7 feed = kcl.create_feed() 8 feed_id = feed.feed_id 9 workspace_uri = f'sortingview-workspace:{feed_id}'
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/kachery_cloud/feeds/create_feed.py:6, in create_feed(project_id) 5 def create_feed(*, project_id: Union[str, None]=None): ----> 6 return Feed.create(project_id=project_id)
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/kachery_cloud/feeds/Feed.py:76, in Feed.create(project_id) 74 else: 75 payload['projectId'] = get_project_id() ---> 76 response = _kacherycloud_request(payload) 77 feed_id = response['feedId'] 78 project_id = response['projectId']
File ~/anaconda3/envs/spyglass/lib/python3.9/site-packages/kachery_cloud/_kacherycloud_request.py:27, in _kacherycloud_request(request_payload) 25 resp = requests.post(url, json=req) 26 if resp.status_code != 200: ---> 27 raise Exception(f'Error in {payload["type"]} ({resp.status_code}) {resp.reason}: {resp.text}') 28 response = resp.json() 29 return response
Exception: Error in createFeed (500) Internal Server Error: Error: Invalid kacherycloud request