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

ValueError: invalid literal for int() with base 10: '10000.0' #88

Open
maurerle opened this issue Feb 18, 2023 · 1 comment · May be fixed by #89
Open

ValueError: invalid literal for int() with base 10: '10000.0' #88

maurerle opened this issue Feb 18, 2023 · 1 comment · May be fixed by #89
Labels

Comments

@maurerle
Copy link

Casting the string directly to an int fails using BATMAN_V when i set up routing between two supernodes:

Feb 18 17:45:30 respondd.py[770]: Traceback (most recent call last):
Feb 18 17:45:30 respondd.py[770]:   File "/opt/mesh-announce/providers/__init__.py", line 153, in call
Feb 18 17:45:30 respondd.py[770]:     _set_value(ret, source.path, source.call(env))
Feb 18 17:45:30 respondd.py[770]:   File "/opt/mesh-announce/providers/__init__.py", line 118, in call
Feb 18 17:45:30 respondd.py[770]:     result = self.source.call(*args)
Feb 18 17:45:30 respondd.py[770]:   File "/opt/mesh-announce/providers/neighbours/batadv.py", line 23, in call
Feb 18 17:45:30 respondd.py[770]:     ifneighbours[fields[0]] = {'lastseen': float(fields[1].strip('s')), 'tq': int(fields[2])}
Feb 18 17:45:30 respondd.py[770]: ValueError: invalid literal for int() with base 10: '10000.0'

I think we need to have something like int(float('10000.0')) instead here

@jplitza
Copy link
Member

jplitza commented Jul 9, 2024

I guess we should use batctl originators_json instead of batctl origintators, which would probably solve this problem, too.

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

Successfully merging a pull request may close this issue.

2 participants