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

atexit doesn’t work properly in batch mode: "cannot schedule new futures after interpreter shutdown" #644

Open
bfontaine opened this issue Mar 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bfontaine
Copy link

bfontaine commented Mar 8, 2024

Hello,

Specifications

  • Client Version: 1.41.0
  • InfluxDB Version: 2.7.5
  • Platform: Ubuntu 23.10

Code sample to reproduce problem

import atexit
from influxdb_client import InfluxDBClient, Point

influxdb = InfluxDBClient(url="...", token="...", org="...")

write_api = influxdb.write_api()


@atexit.register
def close():
    print("closing")
    write_api.close()
    influxdb.close()


write_api.write("<bucket>", record=Point("test_bf").field("test", 1))

Expected behavior

Expected output:

closing

Actual behavior

Actual output:

The batch item wasn't processed successfully because: cannot schedule new futures after interpreter shutdown
closing

As you can see the atexit handler is executed, but the error happens before.

Additional info

No response

@bfontaine bfontaine added the bug Something isn't working label Mar 8, 2024
@rwader-swi
Copy link

looks like issues aren't addressed :(

@bednar bednar self-assigned this May 17, 2024
@bednar
Copy link
Contributor

bednar commented May 17, 2024

Hi @rwader-swi,

Thanks for bringing this to our attention. I appreciate you sharing your concerns with us. I have added this issue to our backlog, and we aim to address it in our next maintenance release.

We value your input as it helps us improve and ensure our software meets user needs. I'll keep you updated on our progress regarding this issue.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants