flatironinstitute / labbox-ephys-widgets-jp

Jupyter widgets for labbox-ephys
1 stars 1 forks source link

UnhandledPromiseRejectionWarning #1

Open warnerwarner opened 3 years ago

warnerwarner commented 3 years ago

Hi,

I'm getting the follow error whenever I try and launch labbox-ephys using the jupyter widget instructions.

(node:71848) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 159)

And then a traceback to the RemoteFeedManager.js file

I started with a fresh conda enviroment, with python 3.8.8 and jupyter 4.7.1 and jupyterlab 3.0.0

It triggers when I try to run the line lew.WorkspaceView(workspace=workspace) from the example notebook

Thanks!

magland commented 3 years ago

Hi. Are you running the kachery daemon? If so, do you see any suspicious output in that terminal?

warnerwarner commented 3 years ago

I am yes, I can't see anything suspicious, but its hard to disentangle as they're running on the same terminal. If I close the jupyter kernel then I just have the periodic usage report from kachery. It does say that downloaded and uploaded are 0 so I'm guessing that they're not communicating correctly?

warnerwarner commented 3 years ago

I also don't know if it helps, but I also receive the warning:

/camp/home/warnert/.conda /envs/labbox-ephys/lib/python3.8/site-packages/ipykernel/ipkernel.py:283: DeprecationWarning: should_run_async will not call transform_cell automatically in the future. Please pass the result to transformed_cell argument and any exception that happen during thetransform in preprocessing_exc_tuple in IPython 7.17 and above. and should_run_async(code)

when I run the le.load_workspace() line

magland commented 3 years ago

Okay, thanks for the report. I'm not concerned about the DeprecationWarning. I'm puzzled about the jupyter kernel and kachery daemon running on the same terminal. I thought the instructions say to run those in two separate terminals? @jsoules is going to try this example out on our end and make sure it is working as expected, then we'll follow up.

warnerwarner commented 3 years ago

Yes, sorry to make it more confusing, but I'm trying to run it on our computing cluster, which I can only run one interactive terminal session at a time, so I need to run then on the same terminal. I follow the commands but just add a & to the line: kachery-p2p-start-daemon --label <node-label> & which launches the daemon and then lets me submit more commands.

warnerwarner commented 3 years ago

To add to this, I can use the kachery_p2p package in jupyter and it appears to be working if I use the

import kachery_p2p as kp
uri = kp.store_npy(X)

X = kp.load_npy(uri)
magland commented 3 years ago

We are also seeing some errors. Will follow up with this tomorrow. Side node: in general, it is best (for troubleshooting) to run the kachery daemon in a separate terminal.

magland commented 3 years ago

@warnerwarner, we fixed a couple things. Please try the latest pypi version (labbox-ephys-widgets-jp) which is 0.1.5. The dependency packages should auto update to latest versions (i am assuming) if you pip install with --upgrade.

warnerwarner commented 3 years ago

Yep, that seems to have fixed it, I can load in the toy simulated recording with no issues. I am having some issues now with the widget view. Particularly the time series view, I'm finding it cut half off, I've attached a screenshot. Any advice on this would be very much appreciated. image

magland commented 3 years ago

Yes, I am seeing the same thing here. I will leave this issue open until we can fix it. But I think that only applies to those two views for the recording. If you click on the sorting (the "true" link in your screenshot), that part of the GUI should display correctly - and that also includes a timeseries view.

warnerwarner commented 3 years ago

Yes you're right, I haven't found any other views that are cut off. Thanks for all your help getting it up and running.