Open mohilmakwana3107 opened 1 week ago
@mohilmakwana3107 You can access the Supabase auth users here: http://localhost:54323/project/default/auth/users
Due to the lack of migration execution, the logs are showing missing tables on Clickhouse:
helicone-web-local | 2024-11-15T14:28:36.531Z
helicone-web-local | ]
helicone-web-local | ClickHouseError: Table default.request_response_rmt doesn't exist.
helicone-web-local | at parseError (/app/web/node_modules/@clickhouse/client/dist/error/parse_error.js:32:16)
helicone-web-local | at ClientRequest.onResponse (/app/web/node_modules/@clickhouse/client/dist/connection/adapter/base_http_adapter.js:127:51)
helicone-web-local | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
helicone-web-local | code: '60',
helicone-web-local | type: 'UNKNOWN_TABLE'
helicone-web-local | }
@thiagoscodelerae How to solve it?
@mohilmakwana3107 I'm trying that right now (also want to setup self hosted Helicone). I saw some people reporting the same error on Discord.
Here is how I solved that.
1 - Change code ch_hcone.py
from:
def run_curl_command(query, host, port, user=None, password=None, migration_file=None):
if not query:
curl_cmd = f"cat \"{migration_file}\" | curl '{
get_host(host)}:{port}/' --data-binary @-"
if user and password:
curl_cmd = f"cat \"{migration_file}\" | curl --user '{user}:{
password}' '{get_host(host)}:{port}/' --data-binary @-"
else:
curl_cmd = f"echo \"{query}\" | curl '{
get_host(host)}:{port}/' --data-binary @-"
if user and password:
curl_cmd = f"echo \"{
query}\" | curl --user '{user}:{password}' '{get_host(host)}:{port}/' --data-binary @-"
result = subprocess.run(curl_cmd, shell=True,
capture_output=True, text=True)
if (result.returncode != 0):
print("Error running query")
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)
sys.exit(1)
return result
To:
def run_curl_command(query, host, port, user=None, password=None, migration_file=None):
if not query:
curl_cmd = f"cat \"{migration_file}\" | curl '{get_host(host)}:{port}/' --data-binary @-"
if user and password:
curl_cmd = f"cat \"{migration_file}\" | curl --user '{user}:{password}' '{get_host(host)}:{port}/' --data-binary @-"
else:
curl_cmd = f"echo \"{query}\" | curl '{get_host(host)}:{port}/' --data-binary @-"
if user and password:
curl_cmd = f"echo \"{query}\" | curl --user '{user}:{password}' '{get_host(host)}:{port}/' --data-binary @-"
result = subprocess.run(curl_cmd, shell=True,
capture_output=True, text=True)
if (result.returncode != 0):
print("Error running query")
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)
sys.exit(1)
return result
2 - Add tabulate
package as part of Dockerfile installation. I created a requirements.txt file here "helicone/clickhouse/requirements.txt" with tabulate package only.
And add the following instruction "helicone/docker/dockerfiles/dockerfile_clickhouse_migration_runner"
:::
COPY . /app
RUN find /app -name ".env.*" -exec rm {} \;
RUN pip3 install --no-cache-dir -r requirements.txt
:::
3 - Run docker compose:
docker compose up --build
Ok, Thanks @thiagoscodelerae And I was the one who created that issue in discord chat.
@mohilmakwana3107 one more step :)
Add MINIO env vars to .env file:
MINIO_ROOT_USER=minioadminuser
MINIO_ROOT_PASSWORD=minioadminuser
You can change the value as well.
Ok thanks @thiagoscodelerae
@mohilmakwana3107 there is now a new issue happening when sending a request to OpenAI/Helicone:
Error parsing default response: SyntaxError: Unexpected token '!', "!
What happened?
I'm attempting to self-host Helicon on my local machine, but I can't access
http://localhost:8989/project/default/auth/users
. The console logs show the following error:I've checked the documentation and can't find any steps I might have missed.
Edit :
Relevant log output
No response
Twitter / LinkedIn details
No response