trt-llm-rag-windows icon indicating copy to clipboard operation
trt-llm-rag-windows copied to clipboard

Missing config/preferences.json and Cookie Handling Errors

Open epodak opened this issue 1 year ago • 1 comments

Description

I encountered several issues while attempting to run a Gradio-based application. The first problem was the application's failure to start due to a missing config/preferences.json file. I addressed this issue by copying an existing config.json file to preferences.json. However, after resolving the missing file issue, I faced further errors related to cookie handling in web requests, which led to session validation failures.

Steps Taken

  1. Missing config/preferences.json File: Noticed the application failed to start due to the absence of config/preferences.json. To resolve this, I copied config.json to preferences.json, which allowed the application to start.
  2. Cookie Handling Errors: After the application started, it encountered errors during the session validation process, specifically a ValueError related to unpacking cookie key-value pairs.

Environment

  • Operating System: win11
  • Python Version: lastest
  • Gradio Version: lastest

Expected Behavior

The application should handle the absence of config/preferences.json gracefully, either by providing clear instructions for its creation or handling its absence without preventing the application from starting. Furthermore, cookie handling in web requests should be robust enough to manage different formats without causing session validation failures.

Actual Behavior

  1. The application did not start due to the missing config/preferences.json, which I worked around by copying config.json to preferences.json.
  2. Post-resolution, the application faced ValueError: too many values to unpack (expected 2) during session validation, indicating issues with cookie handling.

Possible Solution

  • Enhance the application's startup process to handle missing configuration files more gracefully, perhaps by providing default settings or clearer setup instructions.
  • Improve cookie parsing logic to ensure that different cookie formats do not lead to session validation errors.

Additional Context

This issue was encountered in a Conda environment specifically set up for running a Gradio application with particular machine learning models. The session validation errors occurred despite resolving the initial configuration file issue.

epodak avatar Feb 14 '24 00:02 epodak

Hello, is this an issue with Chat with RTX or the trt-llm-rag-windows repo?

kedarpotdar-nv avatar Feb 26 '24 07:02 kedarpotdar-nv