Giter Club home page Giter Club logo

[Bug]: UnpickleableExceptionWrapper('postgrest.exceptions', 'APIError', ('{\'code\': \'42P01\', \'details\': None, \'hint\': None, \'message\': \'relation "public.syncs_active" does not exist\'}',), 'Error 42P01:\nMessage: relation "public.syncs_active" does not exist') about quivr HOT 4 CLOSED

littlezbq avatar littlezbq commented on September 26, 2024
[Bug]: UnpickleableExceptionWrapper('postgrest.exceptions', 'APIError', ('{\'code\': \'42P01\', \'details\': None, \'hint\': None, \'message\': \'relation "public.syncs_active" does not exist\'}',), 'Error 42P01:\nMessage: relation "public.syncs_active" does not exist')

from quivr.

Comments (4)

dosubot avatar dosubot commented on September 26, 2024 2

Hello, @littlezbq! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you're facing.

The error "relation 'public.syncs_active' does not exist" indicates that the table public.syncs_active is not found in the database. This could be due to the table not being created successfully during the deployment.

Based on the provided SQL migration script, the table public.syncs_active should be created with the following command:

create table "public"."syncs_active" (
    "id" bigint generated by default as identity not null,
    "name" text not null,
    "syncs_user_id" bigint not null,
    "user_id" uuid not null default gen_random_uuid(),
    "settings" jsonb,
    "last_synced" timestamp with time zone not null default (now() AT TIME ZONE 'utc'::text),
    "sync_interval_minutes" integer default 360
);

To resolve this issue, ensure that the migration script has been executed successfully. You can verify the existence of the table by running the following query in your database:

SELECT * FROM information_schema.tables WHERE table_name = 'syncs_active';

If the table does not exist, re-run the migration script to create the table. If the table exists, ensure that the correct schema (public) is being referenced in your application [1].

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from quivr.

dosubot avatar dosubot commented on September 26, 2024 2

To troubleshoot the issue where the brain returns a blank response despite no errors in the logs and the public.syncs_active table issue being resolved, you can follow these steps:

  1. Check Current Brain and Prompt: Ensure that currentBrain and currentPrompt are correctly set. If either is null or not properly set, the brain might not have the necessary context to generate a response.

  2. Verify Fetching Status: Confirm that isFetchingBrains is false to ensure that the brains have been fetched and are available.

  3. Inspect Brain Details: Check the currentBrainDetails fetched by useBrainFetcher to ensure that the brain's details are correctly retrieved.

  4. Review State Management: Ensure that the state management for currentBrainId, currentPromptId, allBrains, and publicPrompts is functioning correctly and that the IDs match the expected values.

  5. Check API Call Responses: Ensure that the API calls made by the brain are returning valid responses. The APIBrainQA class in backend/modules/brain/api_brain_qa.py handles API calls and responses. Verify that the get_api_call_response_as_text method is correctly processing the API responses and that no exceptions are being raised.

  6. Log Steps and Responses: Utilize the log_steps method in the APIBrainQA class to log each step of the process. This can help identify where the issue might be occurring. Additionally, ensure that the make_completion method is correctly handling the responses and not exceeding the recursive call limit.

Here is a code snippet to help you verify these aspects:

// Ensure currentBrain and currentPrompt are set
if (!currentBrain) {
  console.error("Current brain is not set.");
  return;
}

if (!currentPrompt) {
  console.error("Current prompt is not set.");
  return;
}

// Ensure brains are fetched
if (isFetchingBrains) {
  console.error("Brains are still being fetched.");
  return;
}

// Check current brain details
if (!currentBrainDetails) {
  console.error("Current brain details are not available.");
  return;
}

// Log the current state for debugging
console.log("Current Brain ID:", currentBrainId);
console.log("Current Prompt ID:", currentPromptId);
console.log("All Brains:", allBrains);
console.log("Public Prompts:", publicPrompts);
console.log("Current Brain Details:", currentBrainDetails);

By verifying these aspects and ensuring that the API calls and responses are correctly handled, you can identify any discrepancies or missing information that might be causing the blank response [1][2].

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from quivr.

littlezbq avatar littlezbq commented on September 26, 2024

it works, no error like this anymore, but the brain still return blank to me, no error in logs checked on docker.

from quivr.

github-actions avatar github-actions commented on September 26, 2024

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

from quivr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.