1. Error: arcgisscripting.ExecuteError : ERROR 000539: Invalid field one_1
analysis:
This problem occurs if the field referenced in the python expression does not exist or is misspelled.
solve:
Change the name of the field in the expression to the correct name.
2. Catch exception
try :
arcpy.Union_analysis (inFeatures, outFeatures, "ALL")
except arcpy.ExecuteError:
arcpy.GetMessages()
3. Syntax error: cannot assign to literal
solve:
Change to condition = '"change" = 0'
4. Error: object: create object layer invalid data source
This is arcpy.mapping.Layer Interface error:
- Check whether the file corresponding to the address passed into the interface exists. (if it is in the file geographic database, the extension does not include. SHP).
-
-
- Note that in the process of spelling address, /and \, do not mix. Generally, \
is used
-
supplement
1. Python gets the file names of all specified suffixes in the specified directory
os.path.splitext():Separate filename and extension
os.path.splitext(file)[0] gets the file name
os.path.splitext(file)[1] get file extension
2. Python template string
from string import Template
query='''
hi,%{name}this is a ${test}
'''
t = Template(query)
query = t.substitute({'name': 'Newber', 'test':'Test'})
Read More:
- How to Fix the common Warning Errors after Vue Project Startup
- How to Solve jmeter Install Error (Three Common Errors)
- How to Fix TNS 12560 Error
- How to Fix KeyError: ‘plotly_domain’
- How to Fix IIS7.5 Disallowed Parent Path Error
- (How to Fix) Ora-00600: internal error code, arguments: [4194]
- How to Fix Error return arrays must be of arraytype
- Start failure: spawn CMD enoent error (How to Fix)
- How to Fix msgsend() error: to many arguments to function call, expected 0, have2
- How to Fix the printer error 0x00000709 on Windows
- How to Fix Microsoft SQL Server Error 1326
- How to Fix Cannot convert value of type Error
- How to Fix “Microsoft Visual C ++ 14.0 is required” Error
- How to Fix PVE Issues: ERROR: migration aborted
- How to Fix “initializer element is not constant” error
- Websocket: How to Fix Error Read Econnreset
- How to Fix “Cannot open Eclipse Marketplace” Error
- How to Fix Spoolsv.exe Application Error
- How to Fix Error Launching Installer WIN10
- AS: How to Fix “XML tag has empty body” Error