{"record":{"id":"798188979b9b908b","repo":"xtekky/gpt4free","slug":"install-gui-requirements-pip-install-u-g4f-gu","errorCode":null,"errorMessage":"Install \"gui\" requirements | pip install -U g4f[gui]\n{import_error}","messagePattern":"Install \"gui\" requirements \\| pip install -U g4f\\[gui\\]\n(.+?)","errorType":"exception","errorClass":"MissingRequirementsError","httpStatus":null,"severity":"error","filePath":"g4f/gui/__init__.py","lineNumber":15,"sourceCode":"from ..errors import MissingRequirementsError\n\ntry:\n    from .server.website import Website\n    from .server.backend_api import Backend_Api\n    from .server.app import create_app\n\n    import_error = None\nexcept ImportError as e:\n    import_error = e\n\n\ndef get_gui_app(demo: bool = False, timeout: int = None, stream_timeout: int = None):\n    if import_error is not None:\n        raise MissingRequirementsError(\n            f'Install \"gui\" requirements | pip install -U g4f[gui]\\n{import_error}'\n        )\n    app = create_app(False)\n    app.demo = demo\n    app.timeout = timeout\n    app.stream_timeout = stream_timeout\n\n    site = Website(app)\n    for route in site.routes:\n        app.add_url_rule(\n            route,\n            view_func=site.routes[route][\"function\"],\n            methods=site.routes[route][\"methods\"],\n        )\n\n    backend_api = Backend_Api(app)\n    for route in backend_api.routes:\n        app.add_url_rule(","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/xtekky/gpt4free/blob/973504e1770928ed5fb82f43da528f441ad9ddc3/g4f/gui/__init__.py#L1-L33","documentation":"Error \"Install \"gui\" requirements | pip install -U g4f[gui]\n{import_error}\" thrown in xtekky/gpt4free.","triggerScenarios":"Thrown at g4f/gui/__init__.py:15 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the GUI requirements: pip install -U g4f[gui]."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"973504e1770928ed5fb82f43da528f441ad9ddc3","analyzedAt":"2026-08-14T23:45:32.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}