Nov-21-2019, 01:04 PM
cannot stat '_ph0/pb.dvscf1': no such file or directory
this error generates
this error generates
modify script.
|
Nov-21-2019, 01:04 PM
cannot stat '_ph0/pb.dvscf1': no such file or directory
this error generates
Nov-21-2019, 05:21 PM
(This post was last modified: Nov-21-2019, 05:21 PM by Gribouillis.)
I'd like to know where the error happened in your script. For this you can add the following file
os2.py in the same directory as your script, and at the top of your script, you replace import os with import os2 as os ,then run your script and report the whole error traceback here again. # os2.py from os import * import subprocess as sp class CommandFailed(Exception): pass def system(command): try: retcode = sp.call(command, shell=True) if retcode < 0: raise CommandFailed( ('Command was terminated by signal', -retcode, 'Command was', command)) elif retcode: raise CommandFailed( ('Command failed with return code', retcode, 'Command was', command)) return retcode except OSError as e: raise CommandFailed( ('Command failed with OSError', e.args, e.filename, e, 'Command was', command))
Nov-23-2019, 06:38 AM
hi Gribouillis ,
this error generated ,
Nov-23-2019, 06:45 AM
(This post was last modified: Nov-23-2019, 07:28 AM by Gribouillis.)
Normally python prints exactly where the error occurs in the python script. This is the useful part. This is what my code was supposed to show.
Nov-23-2019, 03:56 PM
(Nov-23-2019, 06:45 AM)Gribouillis Wrote: Normally python prints exactly where the error occurs in the python script. This is the useful part. This is what my code was supposed to show. It can't, because this program is calling for everything extensively rm and cp .The error came from rm and cp itself, but the program has no clue about Python.So it can't give the expected output. If the creator has used Python-Functions instead of os tools, the code will be much denser and lesser.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Nov-23-2019, 04:43 PM
(This post was last modified: Nov-23-2019, 04:50 PM by Gribouillis.)
DeaD_EyE Wrote:It can'tIt can if you catch the return code of the command as I suggested above. |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
How to modify python script to append data on file using sql server 2019? | ahmedbarbary | 1 | 1,996 |
Aug-03-2022, 06:03 AM Last Post: Pedroski55 |
|
How to modify __init__ of built-in module directly from the script? | sonicblind | 5 | 4,610 |
Jul-31-2018, 12:48 PM Last Post: sonicblind |