Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiException: 404 #25049

Open
xinjaylin opened this issue Jun 10, 2024 · 3 comments
Open

ApiException: 404 #25049

xinjaylin opened this issue Jun 10, 2024 · 3 comments

Comments

@xinjaylin
Copy link

Hello,
I try to use python to write data to influxdb, code like below:
client = InfluxDBClient(url=url, token=token, org=org)
write_api = client.write_api(write_options=SYNCHRONOUS)
point = (
Point('measurement1')
.tag('tagname1', 'tagval1')
.field('field1', val)
)
write_api.write(bucket=bucket, org=org, record=point)
But I get "ApiException: (404)": Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb- Version': 'v2.7.6', 'X-Platform-Error-Code': 'not found', 'Date': 'Mon, 10 Jun 2024 04:50:59 GMT', 'Content-Length': '68'})
HTTP response body: {"code":"not found","message":"bucket "\u003cgg\u003e" not found"}
Any recommend or suggestion is appreciated! Thank you

@xinjaylin
Copy link
Author

write_client = influxdb_client.InfluxDBClient(url=url, token=token, org=org)
bucket = '<gg>'
write_api = write_client.write_api(write_options=SYNCHRONOUS)
for val in range(5):
    point = (
        Point('measurement1')
        .tag('tagname1', 'tagval1')
        .field('field1', val)
    )
    write_api.write(bucket=bucket, org=org, record=point)
    time.sleep(1)

@xinjaylin
Copy link
Author

ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.6', 'X-Platform-Error-Code': 'not found', 'Date': 'Mon, 10 Jun 2024 05:42:47 GMT', 'Content-Length': '68'})
HTTP response body: {"code":"not found","message":"bucket "\u003cgg\u003e" not found"}

@davidby-influx
Copy link
Contributor

You appear to be writing to a bucket named "\u003cgg\u003e", which is not found. Do you have a bucket named those two unicode characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants