# Codes on https://jupyter.org/try-jupyter/lab/ not working properly anymore

**URL:** <https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374>\
**Category:** General\
**Tags:** jupyterlab, help-wanted\
**Created:** [March 11, 2022, 4:22pm UTC](https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374 "2022-03-11T16:22:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DannyN](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@DannyN](https://discourse.jupyter.org/u/DannyN)\
**Post date:** [March 11, 2022, 4:22pm UTC](https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374/1 "2022-03-11T16:22:23Z")

</div>

The follow code on Jupyter Lab I’ve written doesn’t work anymore  
[https://jupyter.org/try-jupyter/lab/](https://jupyter.org/try-jupyter/lab/)

```auto
def check_palindrome():
    s = str(input('Enter a word:'))
    s_upper = (s.upper())
    rev_s = s_upper[::-1]

    if s_upper == rev_s:
        print(s, "is a palindrome.")
    else:
        print(s, "is not a palindrome")
        
check_palindrome()

```

The code prints ’

```auto
<Future pending> is not a palindrome 

```

before I enter the input. After entering the input it doesn’t do anything. I haven’t changed the code at all when it worked

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [March 11, 2022, 8:25pm UTC](https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374/2 "2022-03-11T20:25:47Z")

</div>

We recently switched some of the try repos to use JupyterLite to reduce the load on mybinder: [Https://jupyter.org/try so slow... Why? - #15 by krassowski](https://discourse.jupyter.org/t/https-jupyter-org-try-so-slow-why/11288/15)

JupyterLite has the big advantage that it runs entirely in the browser so won’t run into problems if there are too many users. There are some differences from normal Python though, and using `input` is a known issue- currently using `await` is the workaround:

> <https://github.com/jupyterlite/jupyterlite/issues/275>
>
> Just wanted to share this issue in case someone has ideas.
> 
> \### Problem
> 
> Wit…h pyolite we can now get a user input with:
> \`\`\`python
> i = await input()
> \`\`\`
> which is different than what we are used to in ipython:
> \`\`\`python
> i = input()
> \`\`\`
> The fact that we need to \`await\` is problematic because it means that wherever this is used, the whole call stack must now be async (you cannot use it in a regular Python function).
> 
> \### Proposed Solution
> 
> There is already a running event loop in Jupyterlite, so we can't just run \`input\` until complete.
> There are two tricks that I know of to work around that, unfortunately they don't work:
> \- running \`input\` until complete in another thread with its own event loop (pyolite doesn't support threads).
> \- using \`nest-asyncio\` and run \`input\` until complete in the current event loop (nest-asyncio \`Can't patch loop of type \<class 'pyodide.webloop.WebLoop'\>\`).

If you want to use the original Python kernel you can try one of [Binder Examples · GitHub](https://github.com/binder-examples/)

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [March 12, 2022, 3:10am UTC](https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374/3 "2022-03-12T03:10:14Z")

</div>

Yep, the _interrupt_ button [doesn’t work either](https://github.com/jupyterlite/jupyterlite/issues/459#issuecomment-1024252939)… nor do `urllib`, subprocesses, turtle, tcl and a raft of other things.

Outside of the standard library, it’s even more exciting, as one might be able to `await piplite.install('some-package')`, have it “work”, but then be missing some third-party, non-python library: `graphviz` is a good example.  
Some of these _might_ be fixable, in some browsers, and some of the might work with other hacks. But then, there’s stuff in the python standard library that doesn’t work on _Windows_, properly, so I guess we take what we can get!

At some point in the future, we’re hoping that a [`wasm-32` target for conda-forge](https://github.com/conda-forge/conda-forge.github.io/issues/1401) might make some of these more plausible… but still not everything.

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [March 12, 2022, 6:13pm UTC](https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374/4 "2022-03-12T18:13:38Z")

</div>

> [@manics](#):
>
> If you want to use the original Python kernel you can try one of [Binder Examples · GitHub](https://github.com/binder-examples/)

Yes, selecting from the ‘Pinned’ options near the top of that page, [the requirements example](https://github.com/binder-examples/requirements) or [conda example](https://github.com/binder-examples/conda), and then launching a binder instance using the `launch binder` badge will get you back to the more typical kernel activity you expect. The launch badge for both will spin up a JupyterLab interface and you can switch back to the classic notebook if you prefer by select from the menubar `Help` \> `Launch Classic Notebook`.

There’s shortcuts to doing a lot of that **if you find it more taxing than just when you would go to TryJupyter and click one of the tiles**. For example, using the following URL, or [this link](http://mybinder.org/v2/gh/binder-examples/requirements/master?urlpath=/tree/), you can launch right into the classic notebook interface for the requirements example with the Jupyter dashboard presented at the start:

```plaintext
http://mybinder.org/v2/gh/binder-examples/requirements/master?urlpath=/tree/

```

Or with [this link](http://mybinder.org/v2/gh/binder-examples/requirements/master?urlpath=%2Fnotebooks%2Findex.ipynb) you can launch right into the classic notebook interface based on the requirements example with the index.ipynb notebook coming up the start & that URL is:

```plaintext
http://mybinder.org/v2/gh/binder-examples/requirements/master?urlpath=%2Fnotebooks%2Findex.ipynb

```

You can come back here and select those links or keep the URLs themselves handy.  
If you change part of the URL that’s based on the repo name you can alternatively use the conda example as the basis, i.e, change `requirements` to `conda` in the URLs.
