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

No proper error show when Node is not found #90

Open
davidban77 opened this issue Nov 2, 2020 · 0 comments
Open

No proper error show when Node is not found #90

davidban77 opened this issue Nov 2, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@davidban77
Copy link
Owner

davidban77 commented Nov 2, 2020

Trying to retrieve the in the following manner does not provide a clear NOT FOUND error:

In [31]: cloud2 = Node(name="Cloud2", project_id=prj.project_id, connector=gns3_server)

In [32]: try:
    ...:     cloud2.get()
    ...: except:
    ...:     console.print_exception()
    ...:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ <ipython-input-32-0e5e4b055f2c>:2 in <module>                                                    │
│                                                                                                  │
│ /Users/netpanda/miniconda3/envs/labify/lib/python3.8/site-packages/gns3fy/gns3fy.py:509 in       │
│ wrapper                                                                                          │
│                                                                                                  │
│    506 │   │   │   │   │   raise ValueError(                                                     │
│    507 │   │   │   │   │   │   "Multiple nodes found with same name. Need to submit node_id"     │
│    508 │   │   │   │   │   )                                                                     │
│ ❱  509 │   │   │   │   self.node_id = extracted[0]["node_id"]                                    │
│    510 │   │   # Checks for Link                                                                 │511 │   │   if self.__class__.__name__ == "Link":                                             │
│    512 │   │   │   if not self.link_id:                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range
@davidban77 davidban77 added the bug Something isn't working label Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant