You are here

Error when using "generate_resfile_from_pose" function

2 posts / 0 new
Last post
Error when using "generate_resfile_from_pose" function
#1

hello every one,

I am learning how to use pyrosetta, when i study the workshop6, i meet a problem about generate_resfile_from_pose function.

 

My code:

from pyrosetta import *
from pyrosetta.toolbox import generate_resfile_from_pdb, generate_resfile_from_pose, mutate_residue
pose = pose_from_pdb('ref.pdb')
pymover.apply(pose)

# scoring
score = create_score_function("ref2015")

generate_resfile_from_pose(pose, 'pose.resfile')

 

 

the error returns to me:

core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
Traceback (most recent call last):
  File "./design.py", line 26, in <module>
    generate_resfile_from_pose(pose, 'pose.resfile')
  File "/anaconda2/lib/python2.7/site-packages/pyrosetta-2019.1+release.dbc838b6ae6-py2.7-macosx-10.6-x86_64.egg/pyrosetta/toolbox/generate_resfile.py", line 65, in generate_resfile_from_pose
    import pyrosetta.distributed.packed_pose as packed_pose
  File "/anaconda2/lib/python2.7/site-packages/pyrosetta-2019.1+release.dbc838b6ae6-py2.7-macosx-10.6-x86_64.egg/pyrosetta/distributed/packed_pose/__init__.py", line 24, in <module>
    register_container_traversal(to_pose, dict_to_pose)
  File "/anaconda2/lib/python2.7/site-packages/pyrosetta-2019.1+release.dbc838b6ae6-py2.7-macosx-10.6-x86_64.egg/pyrosetta/distributed/packed_pose/__init__.py", line 22, in register_container_traversal
    register_pandas_container_traversal(generic_func, dict_func)
  File "/anaconda2/lib/python2.7/site-packages/pyrosetta-2019.1+release.dbc838b6ae6-py2.7-macosx-10.6-x86_64.egg/pyrosetta/distributed/packed_pose/pandas.py", line 19, in register_pandas_container_traversal
    @generic_func.register(pandas.DataFrame)
AttributeError: 'module' object has no attribute 'DataFrame'

the function can not found DataFrame from pandas module..

 

my env below:

Macos 10.14

pandas v0.23.4

PyRosetta4.Release.python27.mac.release-206

rosetta_src_2018.33.60351_bundle

 

Are there any one can help to fix it? i had try update pandas, but it does not help.

thank you 

Category: 
Post Situation: 
Fri, 2019-01-25 00:45
zhangying1990

I found that is a bug: 

try to fix it, change the file /anaconda2/lib/python2.7/site-packages/pyrosetta-2019.1+release.dbc838b6ae6-py2.7-macosx-10.6-x86_64.egg/pyrosetta/distributed/packed_pose/pandas.py  as below

import pandas

to

from pandas import DataFrame, Series

 

 

 

Fri, 2019-02-01 00:43
zhangying1990