Unable to 'Display XY Data' and 'Make XY Event Layer' from csv file in ArcGIS Pro.

5018
12
Jump to solution
07-31-2017 10:36 AM
JayHodny
Occasional Contributor III

Hi.  I have a .csv file which contains street camera attribute information, including latitudes (Y) and longitude (X) for each camera location.  This would be a point feature class.  I can Add Data, and bring in the CSV file as a standalone table.  However, when I right-click on the CSV file, click on Display XY Data, which brings up the Make XY Event Layer, I get this error - "Error 000055: Cannot create a Query Table for this workspace......." when I run the GP tool.  I have not seen this error before.  I know I have used this workflow in the past without any issues.  If this cannot be resolved quickly, I will have to find a work around.  Thank you.

1 Solution

Accepted Solutions
JayHodny
Occasional Contributor III

Hi Dan.  I checked the formatting of the lats and longs, and there were a half a dozen or so coordinate pairs that were suspect.  After I cleaned them up, I was able to create the XY layer.  Thank you for your help. Jay

View solution in original post

12 Replies
DanPatterson_Retired
MVP Esteemed Contributor

could be barking at the filename... it has spaces and a -

0 Kudos
JayHodny
Occasional Contributor III

Thank you.  I removed all spaces and the '-' and shortened the csv file name.  Error persists.

0 Kudos
JayHodny
Occasional Contributor III

Hi Dan.  I checked the formatting of the lats and longs, and there were a half a dozen or so coordinate pairs that were suspect.  After I cleaned them up, I was able to create the XY layer.  Thank you for your help. Jay

View solution in original post

Jayanta_Poddar
Honored Contributor

Ensure the structure of the data is fine in the CSV file. Could you attach a sample of the CSV file, so that we could check for any issue in it?

0 Kudos
JayHodny
Occasional Contributor III

Hi Jayanta, I found some coordinate pairs in the csv that were suspect and corrected them.  I was then able to create an XY event layer, and performed a 'Data Export Features' on the temporary event layer, and was able to create a feature class in my gdb.  I think I am back on track.  Many thanks! Jay

RobertHadsell
New Contributor

I ran into this same issue this morning. After month's of running smoothly, one of my python scripts failed with the following Error Code:

ERROR 000055: Cannot create a Query Table for this workspace
Failed to execute (MakeXYEventLayer).

The problem ended up being the data type of the lat long fields in my table. They were of the 'Text' Data type rather than a Double...once corrected, the tool worked! It was very strange, I tried to run the Make XY Event Layer tool manually with the table and ArcGIS Pro automatically populated the X and Y fields for me with the correct fields (but of the wrong data type). Not sure why it took in a text parameter if the tool doesn't allow text for the inputs...

Solution was to change my schema.ini file to bring these fields in as Double and that fixed everything.

Esri may need to consider making that a restriction on the inputs to only accept numeric data types for these parameters in the tools GUI and consider altering the error code to be more data type specific rather than workspace specific. I spent a good part of an hour chasing down a workspace issue when it ended up being a simple data type conversion. Hope this helps!

Thanks,

Robert

AdrianWelsh
MVP Notable Contributor

Robert,

Why were you fields coming in as text? Are there text values in the CSV? I find that, in a raw CSV, if I only have decimal values, the CSV is read in as a double. 

0 Kudos
RobertHadsell
New Contributor

Hello Adrian,

I'm not 100% sure why they were coming in as text. My original schema.ini file didn't include these fields, so I assume that was the issue. I made the change in the ini file and the fields come in as double now...The table I am working with has ~35 fields with text, date, and numeric data types. It's possible Arc wasn't sure how to read each field from the CSV.

Thanks,

Robert

0 Kudos
MarkJackson
Occasional Contributor

Robert - thanks for the fix.

My table appeared fine as a CSV, but was giving me this error, so I read the help for Error 000055 which tells me:

Creating a query table is not supported for the specified workspace. Query tables can only be created using data from a geodatabase or an OLE DB connection.

And the "solution" is to convert the data into one of those things. So - import it into a Geodatabase Table. No complaints. XY Event Layer creation fails again, still with Error 000055. 

Anyway - like you, I don't know why the Longitude column was a double, but the Latitude was a Text field. Schema to force that column as Double and it all works just fine.

0 Kudos