need a batch script to skip error from a python tool

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Locked
Message
Author
raspberry109
Posts: 29
Joined: 07 Jun 2017 23:40

need a batch script to skip error from a python tool

#1 Post by raspberry109 » 05 Sep 2017 14:14

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!!!!!

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

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

#2 Post by aGerman » 05 Sep 2017 15:18

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

raspberry109
Posts: 29
Joined: 07 Jun 2017 23:40

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

#3 Post by raspberry109 » 05 Sep 2017 23:04

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

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

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

#4 Post by aGerman » 06 Sep 2017 07:25

Sorry I'm not familiar with Python. I assume you have to add a proper exception handling.

Steffen

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

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

#5 Post by Squashman » 06 Sep 2017 09:48

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.

Locked