IDEA
|
pathlib seems to be the preferred method for working with system paths in Python 3. We've started using it in place of `os.path` in our office recently and really like it. However, we've run into problems with using it with arcpy. For example: workspace = pathlib.Path('C:\some path') \ 'anotherfolder' \ 'connection.sde'
with arcpy.EnvManager(workspace=workspace):
pass Throws this error: "RuntimeError: Object: Error in accessing environment <workspace>" To work around this, we end up wrapping all of our Path object with str(). For example: workspace = str(pathlib.Path('C:\some path') \ 'anotherfolder' \ 'connection.sde')
with arcpy.EnvManager(workspace=workspace):
pass It would be great if arcpy (Pro version) handled these Path objects natively!
... View more
04-09-2020
09:20 AM
|
28
|
14
|
4054
|
POST
|
Do you have a bug number that you can share? I'm running up against this same issue.
... View more
02-03-2020
12:47 PM
|
0
|
4
|
1351
|
POST
|
I'm also experiencing this same issue. Did you ever find a resolution?
... View more
11-27-2019
09:19 AM
|
0
|
0
|
495
|
POST
|
I was experiencing almost the exact same situation as Detaille Octave. A GP task that ran successfully the first time and then failed on subsequent runs. Switching to `pypyodbc` fixed the issue for me. THANKS!
... View more
07-02-2019
11:27 AM
|
0
|
0
|
1169
|
POST
|
Did you ever find a solution to your problem? I'm having the same issue. I'd love to see an example of someone using the `in_public` parameter successfully.
... View more
09-20-2018
01:55 PM
|
1
|
0
|
799
|
POST
|
Any updates on this issue? I'm beginning a project the may use custom WAB widgets and I don't want to start down the 3.x road (2D) if 4.x support is coming soon. Thanks!
... View more
08-17-2018
04:22 PM
|
0
|
3
|
422
|
POST
|
I'm experiencing this same issue. Upgrading is not an option at the moment. Is there any work around?
... View more
01-18-2018
02:43 PM
|
0
|
4
|
1096
|
POST
|
I think that I found the solution for me: pass `-E` (clears PYTHONPATH) to the python invocation command. Something like this: command = ['propy', '-E', vector_module, basemap, summary, tags]
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) Ref: 1. Command line and environment — Python 2.7.14 documentation
... View more
01-08-2018
10:28 AM
|
0
|
0
|
2473
|
POST
|
Luke: Are you able to import arcpy from your v3 script? That's where I have the issues.
... View more
01-08-2018
10:17 AM
|
0
|
1
|
2473
|
POST
|
SetOnUndone & SetOnRedone - What am I doing wrong? · GitHub
... View more
12-15-2017
10:37 AM
|
0
|
1
|
622
|
POST
|
Have these methods been implemented at 2.0.1? They don't seem to be working for me. They compile fine but I can't get the actions to run when I undo or redo my operations.
... View more
12-04-2017
09:21 AM
|
0
|
3
|
622
|
POST
|
I'm having trouble removing a schema lock from a feature class in a file geodatabase after running arcpy.MakeFeatureLayer(). The typical arcpy.Delete(layer) isn't working. I only experience this issue when running this with Pro's (1.4.1) version of python. It works fine with ArcGIS Desktop. Any ideas? Here's a script that demonstrates the issue: import arcpy
arcpy.management.CreateFileGDB(r"C:\temp", "test.gdb", "CURRENT")
arcpy.management.CreateFeatureclass(r"C:\temp\test.gdb", "Test", "POLYGON", None, None, "ENABLED", "PROJCS['WGS_1984_Web_Mercator_Auxiliary_Sphere',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator_Auxiliary_Sphere'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standard_Parallel_1',0.0],PARAMETER['Auxiliary_Sphere_Type',0.0],UNIT['Meter',1.0]];-20037700 -30241100 10000;#;#;0.001;#;#;IsHighPrecision", None, 0, 0, 0)
arcpy.env.workspace = "c:\\temp\\test.gdb"
layer = arcpy.MakeFeatureLayer_management('Test', 'NewTest')
arcpy.Delete_management('NewTest', 'Layer')
del layer
arcpy.env.workspace = ""
#: lock still exists
arcpy.Delete_management("C:\\temp\\test.gdb")
"""
This throws an exception:
arcgisscripting.ExecuteError: ERROR 000601: Cannot delete C:\Temp\test.gdb.
May be locked by another application.
"""
... View more
06-13-2017
06:31 AM
|
1
|
14
|
12865
|
POST
|
I was able to workaround this bug by copying the table to a temp GDB before calling MakeTableView.
... View more
06-21-2016
12:21 PM
|
1
|
1
|
753
|
DOC
|
Many times as GIS developers we are asked to build geospatial components that integrate with existing applications rather than building the entire application. These components need to be well tested and easy to integrate for other developers. Building a Dojo Widget for another developer is easy enough but what if they don’t have Dojo loaded on the page? How do you integrate your release cycle with theirs? Who’s server should the code be hosted on? How should data be passed between your component and theirs? Here at the Utah AGRC we have built many GIS components for other applications. This presentation will take you through some of our best practices and tricks of the trade that have allowed us to become the go-to-shop within the state government for building these types of products.
... View more
01-04-2016
12:17 PM
|
5
|
1
|
2215
|
POST
|
Did you ever solve your problem? I'm having a similar issue.
... View more
09-03-2015
08:52 AM
|
0
|
4
|
628
|
Title | Kudos | Posted |
---|---|---|
1 | 06-21-2016 12:21 PM | |
28 | 04-09-2020 09:20 AM | |
1 | 06-13-2017 06:31 AM | |
1 | 09-20-2018 01:55 PM | |
5 | 01-04-2016 12:17 PM |
Online Status |
Offline
|
Date Last Visited |
02-24-2024
02:27 PM
|