aiidalab / aiidalab-qe

AiiDAlab App for Quantum ESPRESSO
https://aiidalab-qe.readthedocs.io/
MIT License
9 stars 14 forks source link

use python API to setup code #695

Closed superstar54 closed 2 months ago

superstar54 commented 2 months ago

This raises an error related to the thread, and I don't find a good solution for the moment.

Object '<DbUser at 0x7f08ab67a280>' is already attached to session '4' (this is '2')

Replaed this with #706 .

danielhollas commented 1 month ago

I think the issue here might be that the User instanced is cached, so reloading the profile is not enough. You probably need to bust the cache manually somehow.

superstar54 commented 1 month ago

It seems that aside-core does not support creating a new session in a different thread.

danielhollas commented 1 month ago

Maybe a question for @sphuber

unkcpz commented 1 month ago

It seems that aside-core does not support creating a new session in a different thread.

Exactly, we had a long discussion and struggling that we have to replace the direct use of aiida Node as trait for widgets to using UUID because of the similar problem.

@superstar54 good if you can check this PR https://github.com/aiidalab/aiidalab-widgets-base/pull/543. The _get_code is the function that calls the setup_code if I remember correctly. I think the error "Object '<DbUser at 0x7f08ab67a280>' is already attached" is releted.