April 10, 2017 at 12:30 pm
I'm having the following error when executing a python script manually via VS.
[Execute Process Task] Error: In Executing "python.exe" "'f:/segment.py"" at "", The process exit code was "2" while the expected was "0".
However I can successfully run the script manually in cmd if I copy/paste the code above. Has anyone experienced this issue?
April 10, 2017 at 12:44 pm
Your file path appears to start with a single quote and end with a double quote: was that deliberate?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
April 10, 2017 at 12:48 pm
Ah that was just a mistype on my part when I shortened the path to show on the forum. I do have double quotes on both ends.
April 10, 2017 at 12:55 pm
Aubrey-314204 - Monday, April 10, 2017 12:48 PMAh that was just a mistype on my part when I shortened the path to show on the forum. I do have double quotes on both ends.
OK, are you getting this error in SSDT, or only when running through SQL Agent?
Is the Python file on a local drive, or mapped to network drive?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
April 10, 2017 at 12:56 pm
Did the task actually do what it performed? I note that you have your success exit code set to 0, so SSIS see a 2 as a failure. If so, perhaps 2 is the correct exit code, and thus your task should represent that? Or your could set your task to ignore the exit code completely (but then you should have some other method of checking success).
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 10, 2017 at 1:26 pm
I get this error in SSDT and the python script is on a local drive.
The task fails immediately and does not perform the task. The python code is exiting with the correct success code.
April 10, 2017 at 1:26 pm
Phil Parkin - Monday, April 10, 2017 12:55 PMAubrey-314204 - Monday, April 10, 2017 12:48 PMAh that was just a mistype on my part when I shortened the path to show on the forum. I do have double quotes on both ends.OK, are you getting this error in SSDT, or only when running through SQL Agent?
Is the Python file on a local drive, or mapped to network drive?
I get this error in SSDT and the python script is on a local drive.
April 10, 2017 at 1:32 pm
Aubrey-314204 - Monday, April 10, 2017 1:26 PMPhil Parkin - Monday, April 10, 2017 12:55 PMAubrey-314204 - Monday, April 10, 2017 12:48 PMAh that was just a mistype on my part when I shortened the path to show on the forum. I do have double quotes on both ends.OK, are you getting this error in SSDT, or only when running through SQL Agent?
Is the Python file on a local drive, or mapped to network drive?I get this error in SSDT and the python script is on a local drive.
Please try creating a .BAT file which executes successfully outside of SSIS and then changing your EP task so that it runs that.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
April 10, 2017 at 1:45 pm
Phil Parkin - Monday, April 10, 2017 1:32 PMAubrey-314204 - Monday, April 10, 2017 1:26 PMPhil Parkin - Monday, April 10, 2017 12:55 PMAubrey-314204 - Monday, April 10, 2017 12:48 PMAh that was just a mistype on my part when I shortened the path to show on the forum. I do have double quotes on both ends.OK, are you getting this error in SSDT, or only when running through SQL Agent?
Is the Python file on a local drive, or mapped to network drive?I get this error in SSDT and the python script is on a local drive.
Please try creating a .BAT file which executes successfully outside of SSIS and then changing your EP task so that it runs that.
Thank you for the BAT file suggestion. I was able to pause that and see the real problem. It did not like the underscore I was using in the python script name. I did not think that could be an issue.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply