Select to view content in your preferred language

arcpy.da.TableToNumPyArray crashes on 10.7.1

890
6
Jump to solution
03-14-2022 08:11 AM
Labels (3)
AlessandroValra
Frequent Contributor

Hi,

I've a python Script that create an XY Event, save it to FC and create a list using arcpy.da.TableToNumPyArray.

AlessandroValra_1-1647268132093.png

On TableToNumPyArray arcmap crashes also with "run as administrator" and on python window 
AlessandroValra_3-1647268871359.png

Same script, dveloped on my laptop with 10.8.1  run without problems!

Same error not using Background geoprocessing.

Anyone has any suggestion to try?

Thanks in advance.

Damiano

 

.

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
AlessandroValra
Frequent Contributor

It's very strange because the table contained only 10 records for test.

I completely eliminated the command arcpy.da.TableToNumPyArray with a loop on single record of a table.

Now it runs without problem.

I'm surprised, because I still can't explain the problem. Maybe a 10.7.1 bug?

Thanks.

View solution in original post

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

Did you try

input = (fullpath to fcEvent)

arcpy.da.TableToNumPyArray (input, "FREQUENZE")  # drop the other parameters


... sort of retired...
0 Kudos
AlessandroValra
Frequent Contributor

Hi Dan,

thank for your interesting.

I've tried your suggestion: but with no good results...

AlessandroValra_0-1647354816407.png

Other ideas?

Thanks

0 Kudos
AlessandroValra
Frequent Contributor

New try in cmd "As Administrator"...

AlessandroValra_0-1647356237891.png

An other note: user running script is in Administrator group...

0 Kudos
AlessandroValra
Frequent Contributor

OK, maybe I must change strategy...

AlessandroValra_0-1647358757965.png

on Python3.7 there's a "memory error".

I must change code to use a slower search cursor....

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

sounds like you ran out of memory, you will have to split your tasks into smaller bits or subdivide the data for processing


... sort of retired...
0 Kudos
AlessandroValra
Frequent Contributor

It's very strange because the table contained only 10 records for test.

I completely eliminated the command arcpy.da.TableToNumPyArray with a loop on single record of a table.

Now it runs without problem.

I'm surprised, because I still can't explain the problem. Maybe a 10.7.1 bug?

Thanks.

0 Kudos