I am Trying to run a model by using python script, but an error occurs while running the model by python script despite the fact that the model working fine when I running it directly from ArcMap.
Please see the screenshots below
what might be the issue here?
when run as a standalone script, the script has no idea if there are any selections in the data, hence, there is no inputs since you didn't use an sql expression
if your intent is to just copy the data to a new location, then the help topic suggests using the Copy tool.
The model runs within the toolbox within ArcMap or Pro, because it knows of the existence of selections on the data. The minute you run the script from outside in a standalone python IDE, the knowledge of what is selected and not selected is not known. To fix this, you would need to provide an sql expression in order to get a 'selection'
Your model uses field calculator to populate some fields, right?
in that case try to change the expression type in the field calculator from VB to Python and it will work with you.