Failed to connect to event stream

Hello, I’m trying to create a binder page for https://github.com/rheiland/xml2jupyter and Path to a notebook file": PhysiCell_GUI/mygui.ipynb and I provide a environment.yml with:

name: example-environment
channels:
  - conda-forge
dependencies:
  - python
  - numpy
  - pip:
    - matplotlib
    - scipy

it cranks along and I eventually get “Failed to connect to event stream” in the log.

Some months back I successfully created a binder page for https://github.com/rheiland/xml2gui , however, that repo had the .ipynb in the root dir. Not sure if that’s the problem or not. Also, before using the .yml in my new repo, I tried to use the earlier requirements.txt, but it also failed.

Thanks!

1 Like

hey @rheiland :wave: - one quick thing: could you try re-launching the binder once again? Sometimes the connection between the logs and the UI gets broken, and it returns an error message like this even though the binder is still building OK in the background. Let’s double check that isn’t the case here!

Tried. Got “500 : Internal Server Error”

huh - you are right, that is really strange. I haven’t seen an error like that before. The JupyterHub server starts up fine, and I can create a terminal or text editor. Also, JupyterLab seems to work fine too (just replace notebooks/ with lab/ in the URL then navigate to your notebook in the UI).

I wonder if there’s the wrong version of notebook installed on this server somehow :confused:

Yikes. I don’t like being a trailblazer :-/

I’d welcome any insights as I’m still very much a newbie to binder.

https://mybinder.org/v2/gh/betatim/xml2jupyter/master (small changes in my fork of your repo) seems to work fine. Not sure what caused the notebook server error :-/

When I run yours, I just see the files in the root dir. I was trying to make a specific notebook run that’s contained in a subdir, namely, PhysiCell_GUI/mygui.ipynb . Is this not possible?

You can specify which file to open as part of the launch URL: https://mybinder.org/v2/gh/betatim/xml2jupyter/master?filepath=PhysiCell_GUI%2Fmygui.ipynb

To generate the link you can fill in the launch form like this:

30

It would be great to add a section about this to https://mybinder.readthedocs.io/en/latest/using.html the source of which is https://github.com/jupyterhub/binder/blob/bad5b205fcafb5f2f459956f44245a40b7638e03/doc/using.rst

I appreciate the prompt reply! Yes, this is what I had attempted originally. Now, I’m trying an alternative approach. If that fails, I’ll dig into whatever minor tweaks you made in your fork. Thanks very much!

Strange, this was working and now I’m back to the earlier error. Is this really unique to me/my repo?

—> Running in 9ca2ef532eb8
Removing intermediate container 9ca2ef532eb8
—> ed9a37cb4300
Step 39/44 : RUN conda env update -n root -f “environment.yml” && conda clean -tipsy && conda list -n root
—> Running in cf51894c6b7d
Failed to connect to event stream

That by itself is a “harmless” error. It tells you that there was a hiccup with streaming the logs to you from the build. If you reload the page you should see the build continue. The build runs even without anyone watching it so you don’t have to keep the tab open.

Ah, yes, very good - thanks!

Could you file an issue about the fact that it is totally unclear to anyone not deeply involved in the BinderHub code base that this error is mostly harmless and that pressing refresh will “fix” it? Maybe we can change the message to say something like “Failed to connect to logs, try refreshing page” or some such (ideas welcome).

I saw a relevant issue already existed and I posted to it: https://github.com/jupyterhub/binderhub/issues/743

1 Like

Hi, I have the same error as rheiland, and by refreshing it doesnt solve the problem. it just wipe out whatever that was loading and give me a new binder page.

if i press reload, it goes back to zero


or i get this error. I tried it this morning and there were no problems…

I see below that you do also get the event stream error; however, that may be because things didn’t quite complete in that first image you posted and so it times out & the connection to that UI gets messed up. In other words, your repo finishing up is an issue and that failure is a side effect.
However, you also say that this morning it worked? If you are 100% sure you didn’t change anything on your end since it built and launched earlier, then give the MyBinder system a chance to sort things out. Usually just means waiting a little while before trying again. It may be a behind-the-scenes issue in the large system they have and by it fixing a whole node or something, your situation also gets fixed. That’s assuming your situation isn’t something unusual which I cannot really comment on yet.



Importantly, when posting about such an issue with MyBinder, include a link to your repo or launch link, preferably both. You’ll note the original post that you tagged onto included a link. This way others can look and see if it is something obvious. Or let you know if it launches fine from somewhere else in the world, etc.

1 Like

Hi formightez,
Thank you for your reply, would appreciate if you can help me here. i did make some changes to the enviornment, since i was getting a bunch of warnings when i run the code in notebook.
This is the repo> GitHub - kaibawong/EPA

and this is the launch link>Binder

This is the environment file

I cant seem to find out why this is happpening. i run a previous repo that was working for the last 2 years, i have not changed anything to it, but now it is not working in binder, the repo is herehttps://github.com/kaibawong/COE_crude_differentials