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

What happens when the type string in the DB does not correspond to any Python Class #215

Closed
aiida-bot opened this issue May 30, 2016 · 2 comments

Comments

@aiida-bot
Copy link

Originally reported by: Giovanni Pizzi (Bitbucket: pizzi, GitHub: giovannipizzi)


Right now, the base Node class is returned.
First, we need to discuss if this is ok.
In particular, it may be good maybe to return the 'closest' existing class. A specific issue I have is:

verdi calculation list -p20 -a

05/30/2016 06:19:16 PM, aiida: [ERROR] Unable to find plugin for type 'calculation.job.phonopy.PhonopyCalculation.' (node= 222733), will use base Node class
05/30/2016 06:19:16 PM, aiida: [ERROR] Unable to find plugin for type 'calculation.job.phonopy.PhonopyCalculation.' (node= 222752), will use base Node class
05/30/2016 06:19:16 PM, aiida: [ERROR] Unable to find plugin for type 'calculation.job.phonopy.PhonopyCalculation.' (node= 222773), will use base Node class
05/30/2016 06:19:16 PM, aiida: [ERROR] Unable to find plugin for type 'calculation.job.phonopy.PhonopyCalculation.' (node= 222794), will use base Node class
05/30/2016 06:19:16 PM, aiida: [ERROR] Unable to find plugin for type 'calculation.job.phonopy.PhonopyCalculation.' (node= 222817), will use base Node class
Error (AttributeError): 'Node' object has no attribute '_get_state_string'

Specifically, I don't have the plugin in this branch, a bare "Node" is returned, this does not have the _get_state_string, and therefore I do not see any calculation in the output (not even the other ones). One simple workaround is to fix the 'verdi calculation list' function, but it would be more robust to return in this case e.g. a JobCalculation.


@giovannipizzi
Copy link
Member

@DropD This is to be taken into account for the new plugin system as we discussed

@DropD DropD added this to the Pre-1.0 release milestone Feb 27, 2017
@sphuber
Copy link
Contributor

sphuber commented Apr 11, 2018

This was solved by the safe plugin loader that will fall back on the closest class instead of base Node class. See PR #1185

@sphuber sphuber closed this as completed Apr 11, 2018
@sphuber sphuber modified the milestones: pre-1.0 release, v1.0.0 May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants