编程语言
首页 > 编程语言> > python TypeError: unsupported operand type(s) for +: 'geoprocessing value object' and 

python TypeError: unsupported operand type(s) for +: 'geoprocessing value object' and 

作者:互联网

python TypeError: unsupported operand type(s) for +: 'geoprocessing value object' and 'str'

 
TypeError: unsupported operand type(s) for +: 'geoprocessing value object' and 'str' 
 if self.params[0].value:
        mypath=self.params[0].value #
        cpath=mypath+os.sep+dataset
        arcpy.env.workspace =cpath
修改如下:
 if self.params[0].value:
        mypath=str(self.params[0].value) #
        cpath=mypath+os.sep+dataset
        arcpy.env.workspace =cpath

 

   

 

标签:TypeError,python,self,object,value,cpath,params,mypath,str
来源: https://blog.51cto.com/u_12139363/3025137