Hello,
I'm getting I/O Error 32 during the execution of my Macro.
I began to get this error under Windows 11 Op Sys.
With the same macro on Windows 10 I do not have this error.
The only I/O that I do is to keep track of what I'm doing in Log files.
I user the standard library SUB: DateStamp.
I have settled the Error handling, but this does not capture the error.
The Macro, that is quite big, is randomly stopped with a Message Box without any details where the error did occur. This makes me a problem to identify any possible issue.
Does anyone have any recommendation how to handle this problem?
Thank you
Massimo
Getting randomly -> Error I/O 32
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1369
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Getting randomly -> Error I/O 32
That's a sharing violation. It could be in use or locked by another application. We've seen Onedrive/Dropbox cause this occasionally.
Yes, we have a Custom Scripting Service. Message me or go here
Re: Getting randomly -> Error I/O 32
Thanks Dorian.
However my problem is that I cannot see where the program stops due to this error.
Can you recommend any action to capture Error I/O 32?
The feature: Let>ONERROR=GoErrHandler does not work and the program stops with a Message Box giving no details where the script stops.
However my problem is that I cannot see where the program stops due to this error.
Can you recommend any action to capture Error I/O 32?
The feature: Let>ONERROR=GoErrHandler does not work and the program stops with a Message Box giving no details where the script stops.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1369
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Getting randomly -> Error I/O 32
Ah I see. You could always turn on logging in the Logging tab, using a non-Onedrive location just in case.
I assume you mean you're using DateStamp in a Subroutine. Am I assuming correctly?standard library SUB: DateStamp
Yes, we have a Custom Scripting Service. Message me or go here
Re: Getting randomly -> Error I/O 32
Yes you are assuming correctly.
I have created a SUB to make Logging; in this SUB I use only the standard feature DateStamp that is perfect for my need. In fact I do not write to a OneDrive Location. I map DateStamp to write to a File Server.
I do not have any parallel processing. My main macro calls the developed routine sequentially.
My problem is that I get randomly the error I/O 32 in a Message Box and Macro Scheduler does not capture it in Error Handler.
This stops execution and in addition I do not have any information about the line in code were the problem occurred.
Any method to capture Error I/On 32 within Macro Scheduler?
Hereunder a chunk of code to show how I use this:
===========================================
GoSub>FileLogger,LogStri,LOG_GLOB_FILE,ERROR_LOG_FILE
SRT>FileLogger
DateStamp>TRACE_PGM_FLOW,%bgLpsInfo%: %gblFileName% - Entered in FileLogger
Let>LOCALVARS=1
Let>LogInfo=FILELOGGER_VAR_1
Let>LogFileGlob=FILELOGGER_VAR_2
Let>LogFile1=FILELOGGER_VAR_3
Let>LogFile2=FILELOGGER_VAR_4
DateStamp>LogFileGlob,LogInfo
DateStamp>LogFile1,LogInfo
Assigned>LogFile2,LogFile2IsAssigned
If>LogFile2IsAssigned=TRUE
DateStamp>LogFile2,LogInfo
Endif
DateStamp>TRACE_PGM_FLOW,%bgLpsInfo%: %gblFileName% - Exited FileLogger
END>FileLogger
I have created a SUB to make Logging; in this SUB I use only the standard feature DateStamp that is perfect for my need. In fact I do not write to a OneDrive Location. I map DateStamp to write to a File Server.
I do not have any parallel processing. My main macro calls the developed routine sequentially.
My problem is that I get randomly the error I/O 32 in a Message Box and Macro Scheduler does not capture it in Error Handler.
This stops execution and in addition I do not have any information about the line in code were the problem occurred.
Any method to capture Error I/On 32 within Macro Scheduler?
Hereunder a chunk of code to show how I use this:
===========================================
GoSub>FileLogger,LogStri,LOG_GLOB_FILE,ERROR_LOG_FILE
SRT>FileLogger
DateStamp>TRACE_PGM_FLOW,%bgLpsInfo%: %gblFileName% - Entered in FileLogger
Let>LOCALVARS=1
Let>LogInfo=FILELOGGER_VAR_1
Let>LogFileGlob=FILELOGGER_VAR_2
Let>LogFile1=FILELOGGER_VAR_3
Let>LogFile2=FILELOGGER_VAR_4
DateStamp>LogFileGlob,LogInfo
DateStamp>LogFile1,LogInfo
Assigned>LogFile2,LogFile2IsAssigned
If>LogFile2IsAssigned=TRUE
DateStamp>LogFile2,LogInfo
Endif
DateStamp>TRACE_PGM_FLOW,%bgLpsInfo%: %gblFileName% - Exited FileLogger
END>FileLogger
- Dorian (MJT support)
- Automation Wizard
- Posts: 1369
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Getting randomly -> Error I/O 32
It's my understanding that Macro Scheduler can catch/report Macro Scheduler errors, but not Windows errors.
Turning on logging in the Logging tab will at least tell you where the script stopped, so that's likely to be your starting point.
Once you know that you can include variables in your log file with Let>_DUMP_VARS=1.
This dumps all variables for each line executed and will also slow any script down, so it may be a good idea to enable it just where you're trying to debug. E.G enable it just before wherever your script stopped, and disable is just after.
And of course once the issue is resolved, turn _DUMP_VARS off completely.
Turning on logging in the Logging tab will at least tell you where the script stopped, so that's likely to be your starting point.
Once you know that you can include variables in your log file with Let>_DUMP_VARS=1.
This dumps all variables for each line executed and will also slow any script down, so it may be a good idea to enable it just where you're trying to debug. E.G enable it just before wherever your script stopped, and disable is just after.
And of course once the issue is resolved, turn _DUMP_VARS off completely.
Yes, we have a Custom Scripting Service. Message me or go here
Re: Getting randomly -> Error I/O 32
Ok, I will apply the recommendations.
I need to make experience with it
Thank you for your support
massimo
I need to make experience with it
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Thank you for your support
massimo