Member Site › Forums › PyRosetta › PyRosetta – General › Error when importing protocols.simple_filters
- This topic has 8 replies, 2 voices, and was last updated 11 years, 10 months ago by
Anonymous.
-
AuthorPosts
-
-
October 16, 2012 at 8:37 pm #1433
Anonymous
Hi,
I’m trying to access ddG filter in PyRosseta. But it seems that the simple_filters module is not implemented in current PyRosetta r51661, because the following errors occurred when I trying do so:
>>> from rosetta import *
>>> import rosetta.protocols.simple_filtersTraceback (most recent call last):
File ““, line 1, in
import rosetta.protocols.simple_filters
File “Program FilesPyRosettarosettaprotocolssimple_filters__init__.py”, line 1, in
from __simple_filters_all_at_once_ import *
RuntimeError: extension class wrapper for base class class protocols::evaluation::SingleValuePoseEvaluatorhas not been created yet Just wondering if it is incorporated in the current release. If not, is there any way to rebuild PyRosetta myself to take it in?
Thanks!
-
October 16, 2012 at 8:44 pm #7941
Anonymous
Hi,
Before you imported ‘import rosetta.protocols.simple_filters’ could you please try to ‘import protocols.evaluation’ and let me know if it fix the error?
Thanks,
-
October 16, 2012 at 11:19 pm #7943
Anonymous
Great! I will modify upstream package so such extra import will no longer needed.
-
October 17, 2012 at 9:28 am #7945
Anonymous
Sorry Sergey, but is there any differences between different rosetta library versions in Pyrosetta? I can import DdgFilter in Windows Pyrosetta r46650, but I cannot import it in Linux Pyrosetta r51661. I have build a local Pyrosetta with the default setting along with Rosetta 3.4 release, but I cannot import DdgFilter, either… I really got confused…
-
October 17, 2012 at 11:32 pm #7953
Anonymous
Yes, there is a difference in Rosetta library: each rosetta-lib is build using appropriate revision number so the all slightly different.
Regarding the DdgFilter: It possible that it got relocated to the different namespace. Please search the source code and see where exactly his class located now and the try import that location.
hope that helps,
-
October 18, 2012 at 1:16 pm #7955
Anonymous
No luck. DdgFilter is still in src/protocols/simple_filters/DdgFilter.hh. It also claimed in src/protocols/protein_interface_design/dock_design_filters.hh. Unfortunately, this head file is not included in __protein_interface_design_all_at_once_.source.cc, so I cannot access it with protein_interface_design namespace.
-
October 16, 2012 at 8:58 pm #7942
Anonymous
Hi Sergey,
Yes… It seems that I have to import the stuffs in protocols.evaluation first, for the dependence unknown to me. Here is how it finally worked:
>>> import rosetta.protocols.evaluation
>>> from rosetta.protocols.evaluation import *
>>> import rosetta.protocols.simple_filters
>>> dir(rosetta.protocols.simple_filters.DdgFilter)Many thanks for the suggestion!
-
October 17, 2012 at 8:23 am #7944
Anonymous
Hi Sergey,
I have tried again to see if it is possible to ignore such extra import and I found an interesting phenomenon:
>>> import rosetta.protocols.simple_filters
Traceback (most recent call last):
File “”, line 1, in
import rosetta.protocols.simple_filters
File “Program FilesPyRosettarosettaprotocolssimple_filters__init__.py”, line 1, in
from __simple_filters_all_at_once_ import *
RuntimeError: extension class wrapper for base class class protocols::evaluation::SingleValuePoseEvaluator has not been created yet
>>> import rosetta.protocols.simple_filtersIt means that if I tried to import simple_filters directly, in the first time the runtime error popped up as usual. But when I import it again in the Python interactive IDE, no error occurred… Well it only works in the interactive IDE but not in the script because the running aborted when the first runtime popped up. Just for your information to patch this bug.
Cheers,
-
October 17, 2012 at 7:34 pm #7950
Anonymous
Yes, this is expected behavior: basically what happened is that after first import Python mark module as ‘imported’ and silently skip second attempt to import, so the error is actually still there etc.
-
-
AuthorPosts
- You must be logged in to reply to this topic.