I create a script tool to iterate over tables in a folder with the XY to line tool to create one shapefile for each table. I get the following error message:
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 3160, in XYToLine
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Table: Dataset myout1.csv does not exist or is not supported
Failed to execute (XYToLine).
The file exists, and it is also suitable as input for the XY to Line tool (I can use it as input file in ArcMap, also if I quit iterating and set the path as string it works fine). If I test the iteration code in a python script it also works, each file is accessed. Any ideas what could be the problem?
This is my code:
I have not listed all tool parameters since the code is long and I do not think that is the problem.
And I have managed to do this in modelbuilder but I need it in python for university.
I would be grateful for any help!