Skip to content

Step 2 command line interface tutorial throws TypeErrors #3

@ramansbach

Description

@ramansbach

There are a couple issues (possibly due to dependency version changes?) where, after doing a Conda install with environment.yml and then trying to run Tutorial-Command-Line-Interface-Step_2.py (after running through the Step 1 in the notebook), there is a TypeError:

 line 575, in <module>
    r_plotLigandClusterGrpWindow(refWindow, int(trgtNode),
                                            ~~~^^^^^^^^^^
TypeError: only 0-dimensional arrays can be converted to Python scalars

Running with the Python debugger demonstrates that trgtNode is being set to a one-dimensional single-entry array, which throws a TypeError. To fix this, one can update it to read int(trgtNode[0])

A similar error occurs in line 702, where a TypeError is raised because the dataframe "label" column is set to 0, which is numerical, but pandas cannot cast a numerical column to a string (which is what the command in line 702 does). This can be fixed by changing line 690 to read:

df["Label"] = '0'

This occurs under Python 3.14.3, Pandas 3.0.1 and Numpy 2.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions