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

Script does not close/end on his own #13

Open
mlouarn opened this issue Nov 21, 2022 · 2 comments
Open

Script does not close/end on his own #13

mlouarn opened this issue Nov 21, 2022 · 2 comments

Comments

@mlouarn
Copy link

mlouarn commented Nov 21, 2022

Hi,
When running gemmapy from script+console using python3 the script does not close once running its course.
For example the following does run and gives me the result I expect, the 'done' get printed but I have to manually close the script in the console after. I tried adding a sys.exit() and exit() at the end but it didn't change anything.

import gemmapy
api_instance = gemmapy.GemmaPy()
api_response_h = api_instance.search_datasets(['NR5A1'], taxon="human")
for d in api_response_h.data:
    print(d.accession)
print('done')
@arteymix
Copy link
Member

I'm suspecting that there is a thread in the pool that is still running. I was mistaken, a daemon thread is actually not keeping the VM alive, but a regular thread like those created by the ThreadPoolExecutor do.

To debug this, we can inspect the callables of alive threads to see where they originated from.

https://stackoverflow.com/questions/49992329/the-workers-in-threadpoolexecutor-is-not-really-daemon

@oganm
Copy link
Member

oganm commented May 23, 2024

A version of this that works with the current gemmapy would be

import gemmapy
api = gemmapy.GemmaPy()
response = api.get_datasets('NR5A1', taxa = 'human')
print(response.experiment_accession)
print('done')

And the script seems to reach completion without an issue. Is this still replicable?

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

3 participants