Skip to content

main.py execution script failed #1

@Jagadeep1928

Description

@Jagadeep1928

Hi, As you suggested in the README file I have followed and executed the steps. but the didn't get expected out.

While executing below command getting this error

python3 main.py

Traceback (most recent call last): File "/Users/devel/Workspace/Development/PyCharm/sshmenu/main.py", line 66, in <module> main() File "/Users/devel/Workspace/Development/PyCharm/sshmenu/main.py", line 27, in main data = json.load(f)["hosts"] TypeError: list indices must be integers or slices, not str

And when I executing python3 main.py --add it suppose to generate hosts.json file as per example file which you provided but for me it's generating differently as below

cat ~/.ssh/hosts.json [ { "name": "test app", "username": "admin", "address": "testapp.localhost.com", "port": 22 } ]%

please fix the issue or let me know how to resolve this issue

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