# Access chat app in another app

**URL:** <https://discuss.huggingface.co/t/access-chat-app-in-another-app/130775>\
**Category:** Spaces\
**Created:** [December 12, 2024, 2:28pm UTC](https://discuss.huggingface.co/t/access-chat-app-in-another-app/130775 "2024-12-12T14:28:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hmpatel9](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Hmpatel9](https://discuss.huggingface.co/u/Hmpatel9)\
**Post date:** [December 12, 2024, 2:28pm UTC](https://discuss.huggingface.co/t/access-chat-app-in-another-app/130775/1 "2024-12-12T14:28:31Z")

</div>

Hello team , I have created an sample private space using the gradio temple for chatbot (no change done), that space is working fine .

I am trying to access it and display it in another public space but it gives an error like below

This is the error in app where I am trying to access  
raise AppError(  
gradio\_client.exceptions.AppError: The upstream Gradio app has raised an exception: ‘NoneType’ object is not subscriptable

This is the message in the chatbot app  
message\_serialized, history = self.\_process\_msg\_and\_trim\_history(  
File “/usr/local/lib/python3.10/site-packages/gradio/chat\_interface.py”, line 605, in \_process\_msg\_and\_trim\_history  
history = history\_with\_input[:-1]  
TypeError: ‘NoneType’ object is not subscriptable

Code for chatbot app -default code from template for gradio

Code for app which is trying to access

import os  
import gradio as gr  
from huggingface\_hub import login

# Authenticate with Hugging Face

HF\_TOKEN = os.getenv(“HF\_TOKEN”) # Set your Hugging Face token in the environment  
login(token=HF\_TOKEN) # Authenticate using the token

# Load the private Space (replace with the correct Space ID)

with gr.Blocks() as demo:  
gr.load(“xxx/privateapp”,token=HF\_TOKEN, src=“spaces”)

demo.launch(show\_error=True)

I have also tried making private app public but still the same error

You can also try this and it’s very easy to replicate

Any help here would really help me  
Thank you

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [December 13, 2024, 3:36am UTC](https://discuss.huggingface.co/t/access-chat-app-in-another-app/130775/2 "2024-12-13T03:36:33Z")

</div>

Loading from outside the private Gradio space will not succeed in most cases. I still don’t know whether this is a bug or a feature…🤔

---

<div class="post-metadata">

**Author:** ![Hmpatel9](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Hmpatel9](https://discuss.huggingface.co/u/Hmpatel9)\
**Post date:** [December 13, 2024, 11:10am UTC](https://discuss.huggingface.co/t/access-chat-app-in-another-app/130775/3 "2024-12-13T11:10:25Z")

</div>

Well I have also tried to access by making it public, it’s the issue with the default chatbot app as I also tried other simpler apps they work fine

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [December 13, 2024, 11:15am UTC](https://discuss.huggingface.co/t/access-chat-app-in-another-app/130775/4 "2024-12-13T11:15:49Z")

</div>

Oh, I see, it’s a Gradio bug…  
There’s no such thing as a bug-free Gradio. There must be aliens inside.🙄  
There are too many issues, so it’s impossible to tell whether there’s already something that matches…

> **[Issues · gradio-app/gradio](https://github.com/gradio-app/gradio/issues)**
>
> Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work! - Issues · gradio-app/gradio
