Page 1 of 1

need a batch script to skip error from a python tool

Posted: 05 Sep 2017 14:14
by raspberry109
i use rdpy-master for python and i create a batch file to run 10.000 lines like this:

Code: Select all

rdpy-rdpscreenshot.py -w 1024 -l 800 -o C:/tmp/ 343.324.1.1
rdpy-rdpscreenshot.py -w 1024 -l 800 -o C:/tmp/ 345.12.1.1
rdpy-rdpscreenshot.py -w 1024 -l 800 -o C:/tmp/ 1.1.0.0
etc..


the problem is that sometimes at line X i receive this message:

Code: Select all

rdpy.core.error.RDPSecurityNegoFail: negotiation failure code 5


if I get this error from line 30 then everything stops here,how can i close,pass or skip the lines in which I receive these errors, a batch script?
thanks!!!!!

Re: need a batch script to skip error from a python tool

Posted: 05 Sep 2017 15:18
by aGerman
The batch file continues as soon as the python interpreter quits. If the batch file stops then it means that the python interpreter still runs. So this is a problem of python and not Batch-related.

Steffen

Re: need a batch script to skip error from a python tool

Posted: 05 Sep 2017 23:04
by raspberry109
Ok so i upload the .py file,can you take a look please? the error is this!

when it encounters this error then it does not move to another line,it remains so forever

Code: Select all

rdpy.core.error.RDPSecurityNegoFail: negotiation failure code 5


there are to files .py and .pyc (compiled)
rdpscreenshot.py downlaod link: https://hostr.co/DbIlikz8a0PK
and here rdpscreenshot.pyc (complied file): https://hostr.co/PxhPC81sjDk7

Re: need a batch script to skip error from a python tool

Posted: 06 Sep 2017 07:25
by aGerman
Sorry I'm not familiar with Python. I assume you have to add a proper exception handling.

Steffen

Re: need a batch script to skip error from a python tool

Posted: 06 Sep 2017 09:48
by Squashman
raspberry109 wrote:Ok so i upload the .py file,can you take a look please? the error is this!

No! This forum is not a Python forum.
Closing this thread.