I have a script tool that:   Creates a feature dataset within a file geodatabase Performs a Select by Attributes on a cadastral layer Copies the selected polygons into the feature dataset. The copied polygons are then dissolved to give a property boundary and added to the feature dataset The centroid is then calculated and added to the feature dataset   Now this works fine the first time you run the script. But once you run it for a new property I get the 000210 error whilst trying to copy the selected polygons into the feature dataset. It will create the new feature dataset, but it will not let me copy anything into it. I have tried using personal geodatabases. I have tried outputting to a shapefile and using FeatureClassToGeodatabase tool, all which do not work. BUT if I delete all other feature datasets then it will work. I've checked for locks and there are none. I do not understand what could possibly be going on here  import arcpy, os  #Specify the drive you have stored the NCT_GIS foler on drive = arcpy.GetParameterAsText(0)  #Folders RF_Prop_DB = drive + ":\\NCT_GIS\\DATA\\RF_Properties.gdb" Lambert_Projection = drive +":\\NCT_GIS\\Scripts\\res\\GDA 1994 New South Wales Lambert.prj"  arcpy.env.workspace = (RF_Prop_DB) arcpy.env.overwriteOutput = True lot_DP = arcpy.GetParameterAsText(1).split(';') PropertyName = arcpy.GetParameterAsText(2) #Create the query queryList= [] for i in range(0,len(lot_DP)):     if i % 2 == 0:         lt = lot_DP[i]         DP = lot_DP[i+1]         query_line = """( "LOTNUMBER" = '{0}' AND "PLANNUMBER" = {1} )""".format(lt, DP)         queryList.append(query_line)         if i &lt; (len(lot_DP)):            queryList.append(" OR ") del queryList[len(queryList)-1]         query = ''.join(queryList)   #Create the feature dataset for the property arcpy.CreateFeatureDataset_management(RF_Prop_DB, PropertyName, Lambert_Projection) #Cadastre lotFile = drive + ":\\NCT_GIS\\DATA\\NSWData.gdb\\Admin\\cadastre" #Create lot polygons in feature dataset arcpy.MakeFeatureLayer_management(lotFile, "lot_lyr")  arcpy.SelectLayerByAttribute_management("lot_lyr", "NEW_SELECTION", query) arcpy.CopyFeatures_management("lot_lyr", os.path.join(RF_Prop_DB, PropertyName, "Lots")) #Create property boundary in feature dataset arcpy.Dissolve_management(os.path.join(RF_Prop_DB, PropertyName, "Lots") , os.path.join(RF_Prop_DB, PropertyName, "Boundary"), "", "", "SINGLE_PART", "DISSOLVE_LINES") #Create property centroid in feature dataset arcpy.FeatureToPoint_management(os.path.join(RF_Prop_DB, PropertyName, "Boundary"), os.path.join(RF_Prop_DB, PropertyName, "Centroid"), "CENTROID")
I'm sure there must be a simple reason for this but I can't seem to be able to import a shp file or a feature class from another file or sde geodatabase into a Feature Dataset without getting an error.  The feature classes come in fine if I don't don't try to import them into a Feature Dataset.  The feature dataset definitely has the same projection as the feature classes I'm trying to import so I don't think that's the problem.  The Error I get is ERROR 000210 and just says Failed to convert and cannot create output and Failed to execute (CopyFeatures).    Any ideas what I may be doing wrong here.  Seems like something so simple.  I'm trying to use the Feature Datasets to better organize my data which I think is there purpose.   Update:  So as you can see below, Jason helped me find the answer.   As suggested by Matt below, I added a new Idea to the ArcGIS Ideas site.  Here is the link to that, so please promote this up if you agree a better error message is needed here:
How to code to skip a shapefile, if it doesn't exist? So if shapefile 'AAA010' does not exist, how can I skip the Merge and Clip and move on to the next part of the script? If possible I would like to keep the current script as it is, but by just adding else or if, Sorry still trying to learn the ins and outs.  import os, fnmatch, arcpy   arcpy.env.workspace = r'C:\Users\sysadmin\Desktop\DataMagement\Comp_3\SA_MGCP3.gdb'   fcMerged = 'MergedFeatureClass' fcClipped = 'fcClipped' fcToClip = r'C:\Users\sysadmin\Desktop\DataMagement\Country.shp'  filesMatched = list()  for root, subfolders, files in os.walk (r'C:\Users\sysadmin\Desktop\DataMagement\MGCP_Raw'):      for f in fnmatch.filer(files, 'AAA010.shp'):              filesMatched.append(os.path.join(root,f))      if filesMatched:         print ' files found - merging'         arcpy.Merge_management (filesMatched, fcMerged)         arcpy.Clip_analysis (fcMerged, fcToClip,fcClipped)      else:          print 'nothing found - skipping' Which Pokemon have the highest CP cap? It's clear that the evolved form of Pokemon have a far higher CP cap (and it looks like minimum too) but it would also seem there is a difference between different Pokemon.   For example I have an Oddish at 184 CP which is at 50% of it's cap, and I also have a Ratata at 185 CP but it is far closer to its cap, around 90%.  Which Pokemon have the highest CP caps? How can I prove that $2017 \mid 1^{2017}+2^{2017}+\dots+2017^{2017}$? I tried proving it with the use of modulo, however it was to no avail. Afterwards, I  tried researching, for possible theorems, that may help, but that bore no fruit, either. Can you guys please help me proving it, as I am stuck? Thanking you in advance. How to make a good glow effect around a sun? if $x_i$ are IID  continuous random variables, with $E[x_i]=μ$, is the following correct?   $E\left[\prod_{i=1}^n(1+⍺\space x_i)^i\right] = \prod_{i=1}^nE\left[(1+⍺\space x_i)^i\right] =  \prod_{i=1}^n(1+⍺\space E\left[x_i\right])^i = (1+⍺\space μ)^n$  thanks! I want to bake some displacement maps for Unity Engine. I want to use Cycles renderer. I have read that it's only available in Experimental version of Cycles, but when I changed Cycles to Experimental version there isn't baking type for Displacement map, there are UV, Normals, Shadows etc. but there isn't any Displacement/Depth map choice. I have Blender 2.78a (2016-10-24) downloaded yesterday. Where can I find this option or how can I enable it? How do I install the latest stable version of LibreOffice? LibreOffice is seeing some dramatic improvements each version and subversion that goes out.   I would like to have always the latest version of LibreOffice on my machine(s). I know of the PPA that exists but is it recommended to use it with 12.04 for daily use? What are the pro and cons of using the PPA? Will it break my system/Libreoffice installation?  Does libreoffice get eventually also upgraded in the Ubuntu repositories or does this upgrade happen only with new releases? Who manages the upgrades of libreoffice in Ubuntu and in the PPA? How to sort text in sqlite3 with specified locale? Sqlite3 by default sorts only by ascii letters. I tried to look in google, but the only thing I found were informations about collations. Sqlite3 has only NOCASE, RTRIM and BIARY collations. How to add support for a specific locale? (I'm using it in Rails application) Why are there holes in the icing? I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this? I always see pictures of the solar system where our sun is in the middle and the planets surround the sun. All these planets move on orbits on the same layer. Why? Distribution of a ratio of uniforms: What is wrong? Suppose that  $X$ and $Y$ are two i.i.d. uniform random variables on the interval $[0,1]$  Let $Z=X/Y$, I am finding the cdf of $Z$, i.e. $ \Pr(Z\leq z) $.  Now, I came up with two ways of doing this. One produces a correct answer consistent with the pdf here: , the other does not. Why is the second method wrong?  First Method  $\newcommand{\rd}{\mathrm{d}} \Pr(Z\leq z) = \Pr(X/Y\leq z) = \Pr(X\leq zY) = \int^{1}_{0}\int^{\min(1,zy)}_{0} \rd x \rd y = \int^{1}_{0}\min(1,zy)\ \rd y$ $  = \left\{      \begin{array}{lr}        \int^{1/z}_{0}zy\ \rd y + \int^{1}_{1/z} \rd y&amp; : z &gt; 1\\        \int^{1}_{0}zy\ \rd y &amp; : z \leq 1      \end{array}    \right. $ $  = \left\{      \begin{array}{lr}        1 - \frac{1}{2z} &amp; : z &gt; 1\\        \frac{z}{2} &amp; : z \leq 1      \end{array}    \right. $  This appears correct.  Second Method  $\Pr(X/Y\leq z) = \Pr(X \leq zY\ |\ zY \geq 1)\Pr(zY \geq 1) + \Pr(X \leq zY\ |\ zY &lt; 1)\Pr(zY &lt; 1) $ by total probability  $ = \Pr(X \leq zY\ |\ zY \geq 1)\Pr(Y \geq 1/z) + \Pr(X \leq zY\ |\ zY &lt; 1)\Pr(Y &lt; 1/z)$  Taking $z&gt;1$ yields $ (1)(1-\frac{1}{z}) + (\int^{1/z}_{0}\int^{zy}_{0} \rd x \rd y)(\frac{1}{z}) = 1-\frac{1}{z} + (\int^{1/z}_{0}zy\ \rd y)(\frac{1}{z}) = 1-\frac{1}{z} + \frac{1}{2z^{2}}$  This is already different. Why is this wrong?  Thanks! For which values of $\alpha$ and $\beta$ does the integral $\int\limits_2^{\infty}\frac{dx}{x^{\alpha}\ln^{\beta}x}$ converge? This question is in response to . The original post mentioned that they wish to retract their paper from a "fake" journal. I don't know what a fake journal is but better safe than sorry so I want to make sure what defines a fake journal. In the comments, other people also mentioned "shady" journals and "predatory" journals. This is the first time I encounter these descriptions so I would like to know more about what they entail. I would be interested in hearing about your experience with such journals as well, if any. I am using my school's computers and would like to use zsh instead of bash. I'd like to make it the default shell, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin privileges.   Is there a way I can put something in my .bashrc or something that automatically calls zsh when it opens as a workaround?   To clarify, zsh is already installed. Why rationalize the denominator? File.Copy is giving exception I have a directory containing a large number of files. I want to delete all files except for file.txt . How do I do this?  There are too many files to remove the unwanted ones individually and their names are too diverse to use * to remove them all except this one file.  Someone suggested using   rm !(file.txt)   But it doesn't work. It returns:  Badly placed ()'s    My OS is Scientific Linux 6.  Any ideas? Determining audio level peaks with ffmpeg Is there a plugin I'm missing that allows me to determine the volume samples over the length of an audio file?  For example, a sample of every second to gain the dB vs timestamp? Simple way to understand what derivative is How do I make my document use the Times font, both for the text and the math? I know that I can put \usepackage{times} in the preamble in order to use the Times font instead of Computer Modern for my document.  But this only affects the text; the math is still typeset using Computer Modern.  How can I make Latex use Times also for the math?