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

'Error "no such command" executing command #55

Open
eoporto opened this issue Nov 4, 2019 · 1 comment
Open

'Error "no such command" executing command #55

eoporto opened this issue Nov 4, 2019 · 1 comment

Comments

@eoporto
Copy link

eoporto commented Nov 4, 2019

Miktortik CLI command: /ip hotspot user print where name=User1"

Applied using code below:
api.get_binary_resource('/').call('ip/hotspot/user/print/where', {'name' : 'User1'})

Error:
routeros_api.exceptions.RouterOsApiCommunicationError: ('Error "no such command" executing command /ip/hotspot/user/print/where =name=User1 .tag=3', 'no such command')

What is the correct way to implement the CLI command to python code?

Thank you.

@crbertoldo
Copy link

crbertoldo commented Apr 24, 2020

https://wiki.mikrotik.com/wiki/API_command_notes

E.g. /ip/address/print:

ip_addresses = api.get_resource('/ip/address')  # do not put print baucase it will cause redundancy
print(ip_addresses.get())

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