Solved! Go to Solution.
After some advise I tried another uninstall and full folder wipe, then reinstalled and it seems to have fixed the issue. I'm not sure what changed as I had done that, but I'm back up and running now.
Thanks
to test, skip the substitution and use the actual field names and locations
eg dump, f"{input_name_field} = '{location}'") and this f"memory\\{location}_facility"
I tried running the code in a notebook outside of the loop with everything hard coded and get the same issue unfortunately.
Try adding a '\' to the memory: "\\memory\\CRAN_facility"
There is another thread on here that memory\\ fails, but \memory\\ works. I'll try to link it for reference.
Edit- Here is the thread.
Thanks for the reply, but unfortunatley I now get this error:
ERROR 000210: Cannot create output \memory\CRAN_facility
That is using.
Man, that is troublesome! How about os.path.join('memory', 'CRAN_facility')?
Try adding the r decorator to the string. These two worked for me, but the "memory\\CRAN_facility" gave me the error that you received.
arcpy.CopyFeatures_management(fc, r"memory\CRAN_facility")
arcpy.CopyFeatures_management(fc, os.path.join("memory", "CRAN_facility2"))
Same thing I'm afraid. I don't know enough about the underlying mechanism of the memory or in_memory workspaces, but I have a feeling that something has either moved with the upgrade or something got corrupted.
That said I kind of assumed that a full reinstall would have fixed the issue and it didn't.
I have tried running the code on a colleges computer and it worked on that one, which was also updated Pro to 3.1 yesterday. That tells me it isn't a code issue but an Arcpy or Python issue.
I have also tried cloning the environment but I get the same issue with the clone.
Have you submitted the crash dumps? If you send one to me, I can take a quick look to see if it's anything obvious. Are you using the default `arcgispro-py3` environment, or a custom environment?
Thanks Shaun.
Our work firewall seems to block sending the dump but here is one.
That was using the default environment, but I have also cloned it and get the same. I did try to create a new environment using conda, then installed the arcpy package. When I try to import arcpy using that environment I got the below error so I gave up on that.
ImportError: DLL load failed while importing _arcgisscripting: The specified module could not be found.