Skip to content

TypeError: BlockContext.__init__() got an unexpected keyword argument 'fill_height' #7436

Description

@Solomin0

Describe the bug

Gradio version 4.19.0
In the docs it says there is a fill_height field for blocks but when I try and run this I get an error saying the argument does not exist.

Is there some other package I need to update?

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
def update(name):
    return f"Welcome to Gradio, {name}!"

with gr.Blocks(title = "myApp", theme=gr.themes.Soft(), fill_height = True ) as demo:    
    gr.Markdown("Start typing below and then click **Run** to see the output.")
    with gr.Row():
        inp = gr.Textbox(placeholder="What is your name?")
        out = gr.Textbox()
    btn = gr.Button("Run")
    btn.click(fn=update, inputs=inp, outputs=out)

Screenshot

No response

Logs

line 5, in <module>
    with gr.Blocks(title = "Navi", theme=gr.themes.Soft(), fill_height = True ) as demo:
  File "C:\Users\solomonsj\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 567, in __init__
    super().__init__(render=False, **kwargs)
TypeError: BlockContext.__init__() got an unexpected keyword argument 'fill_height'

System Info

Gradio Environment Information:
------------------------------
Operating System: Windows
gradio version: 4.19.0
gradio_client version: 0.10.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.1.0
altair: 5.0.1
fastapi: 0.109.2
ffmpy: 0.3.0
gradio-client==0.10.0 is not installed.
httpx: 0.24.1
huggingface-hub: 0.20.3
importlib-resources: 6.0.1
jinja2: 3.1.2
markupsafe: 2.1.3
matplotlib: 3.4.3
numpy: 1.23.5
orjson: 3.9.1
packaging: 23.2
pandas: 1.5.3
pillow: 9.4.0
pydantic: 2.6.1
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0
ruff: 0.2.1
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.9.0
uvicorn: 0.22.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2023.6.0
httpx: 0.24.1
huggingface-hub: 0.20.3
packaging: 23.2
typing-extensions: 4.9.0
websockets: 11.0.3

Severity

Blocking usage of gradio

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions