# Can't run space with the jupyterlab template?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-run-space-with-the-jupyterlab-template%2F171805%3E%5C
**Category:** Spaces\
**Created:** [December 21, 2025, 4:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-run-space-with-the-jupyterlab-template%2F171805 "2025-12-21T04:47:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhh210](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zhh210](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fzhh210)%5C
**Post date:** [December 21, 2025, 4:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-run-space-with-the-jupyterlab-template%2F171805%2F1 "2025-12-21T04:47:50Z")

</div>

Creating a space with the jupyterlab docker template but it keeps being an empty page despite status turned `Running`. The container log shows failure of:

```bash
[I 2025-12-21 05:44:40.012 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2025-12-21 05:44:40.013 LabApp] JupyterLab extension loaded from /home/user/miniconda/lib/python3.9/site-packages/jupyterlab
[I 2025-12-21 05:44:40.013 LabApp] JupyterLab application directory is /home/user/miniconda/share/jupyter/lab
[I 2025-12-21 05:44:40.014 LabApp] Extension Manager is 'pypi'.
[W 2025-12-21 05:44:40.014 LabApp] Failed to instantiate the extension manager pypi. Falling back to read-only manager.
    Traceback (most recent call last):
      File "/home/user/miniconda/lib/python3.9/site-packages/jupyterlab/labapp.py", line 837, in initialize_handlers
        ext_manager = manager_factory(app_options, listings_config, self)
      File "/home/user/miniconda/lib/python3.9/site-packages/jupyterlab/extensions/ __init__.py", line 46, in get_pypi_manager
        return PyPIExtensionManager(app_options, ext_options, parent)
      File "/home/user/miniconda/lib/python3.9/site-packages/jupyterlab/extensions/pypi.py", line 134, in __init__
        self._httpx_client = httpx.AsyncClient(proxies=proxies)
    TypeError: __init__ () got an unexpected keyword argument 'proxies'`

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [December 21, 2025, 5:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-run-space-with-the-jupyterlab-template%2F171805%2F2 "2025-12-21T05:57:31Z")

</div>

Seems `httpx` related issue?

* * *

## What your log error actually means

Your traceback is a dependency mismatch between **JupyterLab’s PyPI Extension Manager** and **httpx** :

- JupyterLab is trying to create an `httpx.AsyncClient(proxies=...)`.
- **httpx 0.28.0 removed the `proxies` argument**.
- So JupyterLab crashes that specific component with `TypeError: __init__ () got an unexpected keyword argument 'proxies'`. ([GitHub](https://github.com/encode/httpx/releases "Releases · encode/httpx · GitHub"))

Important nuance: in your log, JupyterLab says it is **“falling back to read-only manager.”** That means the _extension manager_ fails, but **JupyterLab itself may still be running**. So the blank page on a Hugging Face Space is often _not caused solely by this warning_.

This exact JupyterLab error is tracked upstream. ([GitHub](https://github.com/jupyterlab/jupyterlab/issues/17012 "Failed to instantiate the extension manager pypi · Issue #17012 · jupyterlab/jupyterlab · GitHub"))

* * *

## Why this happens (root cause)

### 1) httpx API change (the direct cause of the TypeError)

httpx 0.28.0 removed `proxies`. This is documented in their release notes. ([GitHub](https://github.com/encode/httpx/releases "Releases · encode/httpx · GitHub"))

So if your environment has:

- **JupyterLab version that still calls `AsyncClient(proxies=...)`**, and
- **httpx \>= 0.28.0** ,

you get exactly the exception you pasted. ([GitHub](https://github.com/jupyterlab/jupyterlab/issues/17012 "Failed to instantiate the extension manager pypi · Issue #17012 · jupyterlab/jupyterlab · GitHub"))

### 2) “Who pulled in httpx 0.28+?”

On Spaces, this commonly happens because some other dependency upgrades httpx (directly or indirectly). This same breakage showed up across the ecosystem (OpenAI Python SDK, LangChain, etc.) when httpx 0.28.0 landed. ([GitHub](https://github.com/openai/openai-python/issues/1902 "Use of proxies kwarg in httpx==0.28.0 · Issue #1902 · openai/openai-python · GitHub"))

### 3) JupyterLab’s own moving target around httpx

JupyterLab added fixes and also had a period of **tight pinning** around httpx 0.28.x because the API surface changed quickly. ([GitHub](https://github.com/jupyterlab/jupyterlab/issues/17035 "Reconsider hard/exact `httpx` dependency · Issue #17035 · jupyterlab/jupyterlab · GitHub"))

* * *

## Fix the `proxies` crash (pick one approach)

### Option A (usually best): upgrade JupyterLab to a version that handles newer httpx

JupyterLab 4.2.7 notes fixes specifically around extension manager + httpx versions (including proxy handling). ([jupyterlab.readthedocs.io](https://jupyterlab.readthedocs.io/en/4.2.x/getting_started/changelog.html "JupyterLab Changelog — JupyterLab 4.2.7 documentation"))

Practical pin set (example):

```txt
jupyterlab>=4.2.7,<5
httpx>=0.28.0,<0.29

```

This path is best if other libs in your Space already require httpx 0.28+.

### Option B (quick workaround): pin httpx below 0.28

If you do not care about staying on httpx 0.28+ (and no other dependency demands it), pin:

```txt
httpx<0.28

```

This is exactly the “temporary override” people used in other projects when they hit the same break. ([GitHub](https://github.com/langchain-ai/langchain/issues/28406 "Deprecated argument(s) removed when using `httpx==0.28.0` · Issue #28406 · langchain-ai/langchain · GitHub"))

### Option C (often best for hosted Spaces): disable the PyPI extension manager entirely

On Hugging Face Spaces, you often do **not** want “install random packages from the UI” anyway.

JupyterLab supports switching extension manager to read-only:

```bash
jupyter lab --LabApp.extension-manager=readonly

```

This avoids the whole PyPI manager path. ([jupyterlab.readthedocs.io](https://jupyterlab.readthedocs.io/en/latest/user/extensions.html "Extensions — JupyterLab 4.6.0a0 documentation"))

* * *

## Why the Space shows an empty page even though it says “Running”

On Hugging Face Spaces, a “blank app frame” usually comes from **hosting/proxy/browser constraints** , not from the extension manager warning.

### Cause 1: Cookie + iframe restrictions (very common)

Hugging Face serves your app on `*.hf.space` **inside an iframe** on a `huggingface.co` page. Browsers restrict cookies in this setup. Hugging Face documents this explicitly. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-cookie-limitations "Cookie limitations in Spaces"))

JupyterLab uses cookies for auth/session (even when token-based). If cookies are blocked or have the wrong SameSite policy, you can get a blank screen, failed redirects, or a login loop that looks like “empty page”.

**Concrete mitigation used by a known-working JupyterLab Space** :

- set cookie `SameSite=None; Secure=True`
- allow iframe embedding via CSP `frame-ancestors *`
- often also disable XSRF checks in this proxied embedding scenario

Example launch flags from an existing JupyterLab Space template: ([Hugging Face](https://huggingface.co/spaces/multimodalart/jupyterlab-permanent-default/blame/89e5b6ee9d7a9074306db418924126ca60245ce3/start_server.sh "start\_server.sh · multimodalart/jupyterlab-permanent-default at 89e5b6ee9d7a9074306db418924126ca60245ce3"))

- `--ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}"`
- `--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}"`
- `--ServerApp.disable_check_xsrf=True`

If your JupyterLab docker template does not set these, add them.

Also note: private Spaces have had multiple “Running but blank” reports in the community. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprivate-spaces-wont-load-apps%2F110193 "Private Spaces won't load Apps - Beginners - Hugging Face Forums"))

### Cause 2: Wrong port exposed (also common)

Docker Spaces expect your web server on **port 7860 by default** (or whatever you set via `app_port`). If Jupyter starts on 8888, Spaces can show “Running” while the embedded page is effectively empty. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-docker "Docker Spaces"))

So ensure:

- JupyterLab is launched with `--port 7860 --ip 0.0.0.0`
- README YAML includes `app_port: 7860` if you rely on defaults (or set it explicitly)

Hugging Face’s Docker Spaces docs call this out. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-docker "Docker Spaces"))

### Cause 3: Private Space visibility and authentication edge cases

Private resources can present as **404** to anyone without proper auth context. People have reported “public works, private blank/404”. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprivate-spaces-wont-load-apps%2F110193 "Private Spaces won't load Apps - Beginners - Hugging Face Forums"))

Even if you are logged in, aggressive tracking protection can block the iframe’s cookie context and break “private embed auth”.

* * *

## Minimal “known-good” checklist for a JupyterLab Space

1. **Port**

- `--port 7860 --ip 0.0.0.0` ([Hugging Face](https://huggingface.co/spaces/multimodalart/jupyterlab-permanent-default/blame/89e5b6ee9d7a9074306db418924126ca60245ce3/start_server.sh "start\_server.sh · multimodalart/jupyterlab-permanent-default at 89e5b6ee9d7a9074306db418924126ca60245ce3"))

1. **Iframe + cookies**

- CSP `frame-ancestors *`
- cookies `SameSite=None, Secure=True` ([Hugging Face](https://huggingface.co/spaces/multimodalart/jupyterlab-permanent-default/blame/89e5b6ee9d7a9074306db418924126ca60245ce3/start_server.sh "start\_server.sh · multimodalart/jupyterlab-permanent-default at 89e5b6ee9d7a9074306db418924126ca60245ce3"))

1. **Token**

- Set `JUPYTER_TOKEN` (HF docs note default is `huggingface` and recommend setting one). ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-docker-jupyter "JupyterLab on Spaces"))

1. **Dependency sanity**

- Either (A) upgrade JupyterLab to match httpx 0.28+ behavior or (B) pin httpx \< 0.28. ([GitHub](https://github.com/encode/httpx/releases "Releases · encode/httpx · GitHub"))

1. **Avoid UI extension installs**

- Prefer `--LabApp.extension-manager=readonly` on hosted deployments. ([jupyterlab.readthedocs.io](https://jupyterlab.readthedocs.io/en/latest/user/extensions.html "Extensions — JupyterLab 4.6.0a0 documentation"))

* * *

## Similar cases online (the ones that match your symptoms)

### Same `proxies` TypeError pattern

- JupyterLab issue: “Failed to instantiate the extension manager pypi” with the same `AsyncClient(proxies=...)` crash. ([GitHub](https://github.com/jupyterlab/jupyterlab/issues/17012 "Failed to instantiate the extension manager pypi · Issue #17012 · jupyterlab/jupyterlab · GitHub"))
- httpx release notes: `proxies` removed in 0.28.0. ([GitHub](https://github.com/encode/httpx/releases "Releases · encode/httpx · GitHub"))
- OpenAI Python SDK issue: same TypeError after upgrading httpx 0.28.0. ([GitHub](https://github.com/openai/openai-python/issues/1902 "Use of proxies kwarg in httpx==0.28.0 · Issue #1902 · openai/openai-python · GitHub"))
- LangChain issue: same TypeError, workaround is pinning httpx `<0.28.0`. ([GitHub](https://github.com/langchain-ai/langchain/issues/28406 "Deprecated argument(s) removed when using `httpx==0.28.0` · Issue #28406 · langchain-ai/langchain · GitHub"))

### “Running but blank” on Hugging Face (private/public differences, iframe issues)

- HF forums: reports of Private Spaces not loading apps even while “Running”. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprivate-spaces-wont-load-apps%2F110193 "Private Spaces won't load Apps - Beginners - Hugging Face Forums"))
- Gradio issue: “private space not show … solved by making it public” class of symptom. ([GitHub](https://github.com/gradio-app/gradio/issues/7808 "private space not show on huggingface · Issue #7808 · gradio-app/gradio · GitHub"))
- HF docs: explicit explanation of cookie limitations due to iframe + cross-domain hosting. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-cookie-limitations "Cookie limitations in Spaces"))

* * *

## If you want a fast diagnosis path (no guessing)

1. Confirm versions in your Space build logs:

```bash
python -c "import jupyterlab, httpx; print('jupyterlab', jupyterlab. __version__ , 'httpx', httpx. __version__ )"

```

1. Confirm Jupyter is actually listening on 7860:

```bash
python -c "import socket; s=socket.socket(); print(s.connect_ex(('127.0.0.1',7860))==0)"

```

1. Open browser devtools on the Space page:

- If you see cookie warnings or blocked storage, this is the iframe cookie limitation case. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-cookie-limitations "Cookie limitations in Spaces"))
- If network shows nothing on the app iframe, suspect wrong port. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-docker "Docker Spaces"))

* * *

## Summary

- Your `proxies` TypeError is a **JupyterLab ↔ httpx mismatch** caused by **httpx 0.28.0 removing `proxies`**. ([GitHub](https://github.com/encode/httpx/releases "Releases · encode/httpx · GitHub"))
- Fix it by either **upgrading JupyterLab** , **pinning httpx \< 0.28** , or **forcing extension manager read-only**. ([jupyterlab.readthedocs.io](https://jupyterlab.readthedocs.io/en/4.2.x/getting_started/changelog.html "JupyterLab Changelog — JupyterLab 4.2.7 documentation"))
- The **blank Space page** is often **cookie/iframe** or **wrong port** , not the extension manager warning. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-cookie-limitations "Cookie limitations in Spaces"))
- Known-good Space launch flags include `SameSite=None; Secure` cookies and `frame-ancestors *`. ([Hugging Face](https://huggingface.co/spaces/multimodalart/jupyterlab-permanent-default/blame/89e5b6ee9d7a9074306db418924126ca60245ce3/start_server.sh "start\_server.sh · multimodalart/jupyterlab-permanent-default at 89e5b6ee9d7a9074306db418924126ca60245ce3"))
