Closed luisvalleGH closed 10 months ago
I am confused. You wrote that code works and when you consume iterator, you get a error.
I am confused. You wrote that code works and when you consume iterator, you get a error.
The code works because the file is correctly imported into the Mikrotik, but it throws an error when it tries to bring the output. Try to print or iterate in the response and you'll get the error, unless this is a spected behaviour of the Mikrotik API and it's a fire and forget command where you don't get any output.
I've done import on my router and all works fine. I have 7.12 version. Try importing same file from cli and see if it throws any error.
I've done import on my router and all works fine. I have 7.12 version. Try importing same file from cli and see if it throws any error.
Yes, the import works OK as I wrote before, what i can't get is the OUTPUT, I'm testing this in 6.x versions, in 7.x I'm using the Rest API.
But there is no output from import.
But there is no output from import.
Ok, It's possible a concept error I have. After the file is imported the console hasta an output Script file loaded and executed successfully
also during the script in the file you can log or :put lines in the console. This "Output" might not be considered in the API.
Thank's @luqasz , I'm closing the issue.
I have to approachs that work perfectly and Import a file inside the Mikrotik correctly. The issue I'm facing is to get the output of the command.
Inside the console I got this
Whe using the library and doing the command via API this are the two codes that work
When I try to consume the generator
response
returning it or iterating it i got a trap error