Select to view content in your preferred language

Exporting Model Builder to Phyton Scripts

2876
4
01-05-2016 12:57 PM
FereshtehAghyan
Deactivated User

I have one feature Layer and two standalone variable (String Type) in my model Builder. Those stand alone variables are being used two inputs to get a name and a number and add them to the name of the output tableI. I can run the model without any issue, but when I convert it to Python, I keep getting the following  errors:

ExecuteError: Failed to execute. Parameters are not valid.

ERROR 000814: Invalid file type

I set my Parameter as they are in my Model builder, but cannot find out the reason that this issue pups up all the time. I would appreciate if you have any solution for it.

Thanks,

Fery

0 Kudos
4 Replies
DarrenWiens2
MVP Honored Contributor

Please post your python script and the entire error message, which should indicate which line caused the error.

FereshtehAghyan
Deactivated User

Thank you for the rsponse Darren, I have changed the Python script and it is working now. It seems my standalone variable caused that issue.

0 Kudos
DanPatterson_Retired
MVP Emeritus

A few lines of the offending code might help resolve the issue.  It would be possible to check whether the correct type is specified and/or whether you have allowed existing outputs to be over-written etc

FereshtehAghyan
Deactivated User

Thanks for your response Dan, I tried to rewrite the model and avoid of creating any standalone variable, and it is working now.

0 Kudos