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

get_bgp_neighbours invalid literal for int() with base 10: '' #58

Open
samuelbarata opened this issue Feb 6, 2025 · 1 comment
Open

Comments

@samuelbarata
Copy link
Contributor

ERROR:root:Error occurred : invalid literal for int() with base 10: ''

The error seems to be occurring in Line 357

When debugging my code, that line is reached with the variable local_as having a value of:

"{'as-number': 100, 'prepend-global-as': True, 'prepend-local-as': True}"

and after the execution of said line, the value of local_as becomes:

['as-number', 'prepend-global-as', 'prepend-local-as']

I believe that the intended outcome based on the for in Line 359 is that the string is to be evaluated into a list of dictionaries.
I don't have an example where it would return more than one dictionary so I'm fixing it locally by replacing the line with:

local_as = [eval(local_as.replace("'", '"'))]

Which will produce the following outcome:

[{'as-number': 100, 'prepend-global-as': True, 'prepend-local-as': True}]
@hellt
Copy link
Collaborator

hellt commented Feb 6, 2025

Hi @samuelbarata

Sorry you had to encounter this. Currently there is no one working on this project, and ultimately we wanted to switch from gnmi to json-rpc, the work has started in #56 but we got distracted with other priorities...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants