Closely related to , except I am running ArcGIS 10.4. It should be possible for me to make 10.1 copies of all my 10.4 mxds. Here is my code:  import arcpy, sys, os, string   dir = r"D:\Path\To\Maps" outloc = os.path.join(dir, "Compatible_MXDs") version = '10.1'  suffix = "_"+ version.replace(".", "")  # Get all mxds in this directory arcpy.env.workspace = dir mxdList = arcpy.ListFiles("*.mxd")  for file in mxdList:     print(file) # mymap.mxd     mxd = arcpy.mapping.MapDocument(os.path.join(dir, file))     base = os.path.basename(file)     print(base)     # ('D:/Path/To/Maps/mymap', '.mxd')     base = os.path.splitext(base)[0] + suffix + os.path.splitext(base)[1]      mxd.saveACopy(outloc + os.sep + base, version)     print(os.path.basename(file) + " has been converted")   But I get the same error:  Traceback (most recent call last): File "MakeMXDsBackwardsCompatible.py", line 21, in &lt;module&gt; mxd.saveACopy(outloc + os.sep + base, version) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\utils.py", line 182, in fn_ return fn(*args, **kw) File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\_mapping.py", line 877, in saveACopy self._arc_object.saveACopy(file_name, version) AttributeError: MapDocObject: Unable to save.  Check to make sure you have  write access to the specified file and that there is enough space on the  storage device to hold your document.   I'd rather not use the "File -> Save a Copy -> change mxd version" dialogue for 500 separate mxds over multiple directories.    While my question is also closely related to , the answers are still not satisfactory for my problem. The relevant (simplified) code:  mxd = arcpy.mapping.MapDocument(r"D:\Path\To\Maps\mymap.mxd")  mxd.saveACopy(r"D:\Path\To\Maps\Compatible_MXDs\mymap_101.mxd", '10.1')   Now with regard to that question's answers...  1) I have no mxds with the same name already on disk, nor am I trying to overwrite.  2) I am not attempting to overwrite an mxd file that is already in use. No other scripts are concurrently accessing it. Furthermore nothing changes even after I add  del mxd   at the end.  3) Again, I am not calling anything like  mxd.saveACopy(mxd)   I have read the .  I have tried rebooting and running my script without starting ArcMap. I don't use an IDE, but use Notepad++ to write my scripts and execute them on my command line with python MakeMXDsBackwardsCompatible.py
I'm trying to use arcpy to save an .mxd and am having an issue.  It doesn't matter if I use mxd.save or mxd.saveACopy I get the same error.  I know it doesn't look like I am doing anything w/ it here, but it's just a portion of my code:  import arcpy import arcpy.mapping as map arcpy.env.overwriteOutput = True  env.workspace = r"C:\MGIS\FinalProject2.gdb     mxd = map.MapDocument(r"C:\MGIS\Finalproject2.mxd") df = map.ListDataFrames(mxd)[0]  for df in map.ListDataFrames(mxd): df.scale = 2000000  #Add layers into map document addLayer = map.Layer(OKXcounties) addLayer1 = map.Layer(contourLabelText) addLayer2 = map.Layer(contoursClipLyr) addLayer3 = map.Layer(clipOKXLyr) map.AddLayer(df, addLayer, "AUTO_ARRANGE") map.AddLayer(df, addLayer1, "AUTO_ARRANGE") map.AddLayer(df, addLayer2, "AUTO_ARRANGE") map.AddLayer(df, addLayer3, "AUTO_ARRANGE")  # Add contour Labels for lyr in map.ListLayers(mxd):     if lyr.name == "contourLabelText":         lyr.showLabels = True     if lyr.name == "Contour Features":         lyr.transparency = 100  mxd.saveACopy(mxd)   I get the following error:   Traceback (most recent call last):   File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 312, in RunScript     exec codeObject in __main__.__dict__   File "C:\MGIS\geog485\FinalProject2\mxdtest.py", line 7, in &lt;module&gt;     mxd.saveACopy(mxd)   File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\utils.py", line 181, in fn_     return fn(*args, **kw)   File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\_mapping.py", line 668, in saveACopy     self._arc_object.saveACopy(file_name) AttributeError: MapDocObject: Unable to save.  Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document.   Space is not the issue, I have 60 GB of free space and I've checked the windows properties of the .mxd file.  Read-only box is unchecked and I've "allowed" all permissions for all groups:    Does anyone have any idea how if this is a bug or how I can fix this?  I'm using ArcInfo 10.0 SP4.
Why are all snaps being mounted and listed as block devices or partitions for Ubuntu 18.04? Automatically redirect anonymous user from unanswered duplicate question to corresponding answered version Duplicate questions that use different words to describe the same problem are important for people to find the content via search engines. But the user experience when an anonymous user arrives at a duplicate is less than ideal.  They have to notice the duplicate link and understand that the answer they are looking for is likely behind that link. I don't think this is all that obvious to someone without experience with an SE site.  I propose to just redirect users to the duplicate automatically if the closed duplicate has zero answers. In that case they need to follow the link to the duplicate in any case, so we might as well redirect them to it in the first place.  I could imagine this being problematic with search engines, as we would be displaying different content than what the search engines see. If that is too problematic I would suggest to show a very obvious link to the duplicate in the answers section for anonymous users. Why is my Wi-Fi process using 3GB of memory? $A^A$ in category of graphs (reference is Lawvere/Schanuel, Session 31, Ex. 1)  I'm trying to calculate the exponential object $A^A$ and its evalution map $e \colon A \times A^A \to A$ in the category of graphs, where $A$ is the "arrow graph" (ie. one arrow and two dots).  In the following, $D$ is the graph with one dot and no arrows, $1$ is the terminal object in this category (graph with one dot and one arrow, the loop).  So far I have:   The points of $\mathbf{1}\to A^A$ correspond to the maps $A\to A$ (via two standard isomorphisms), and since $\mathbf{1}$ is the loop, and there is one map of graphs $A \to A$, there is one loop in $A^A$. The dots $D\to A^A$ correspond to the maps $A \times D \to A$, of which there are four, hence four dots in $A^A$. The arrows $A \to A^A$ correspond to the maps $A \times A \to A$, of which there are four, hence four arrows in $A^A$.   But I'm stuck on how to put these together to constitute $A^A$ and its evaluation map. Refreshing Formula Fields Dynamically (without save) I have an "invoice" custom object which has a couple of summarising formula fields in. I also have a complicated and dynamic visualforce page for building the invoice objects.  As the user is completing this form, different areas are dynamically updated to show "latest" values. This is all fine where I am copying data about or performing bespoke lookups and maths, but - in what is really the simplest case - a formula field, I can find no way to get the value to update, without performing some weird cyclic save + reload of the whole object.  This is inappropriate for a couple of reasons (the object should not be saved until the invoice is complete + accepted) and the other option I have found online is to spoof the value by duplicating my formula field maths into the custom controller and re-executing them there - also unacceptable from a code/logic location/duplication perspective.  Is there anyway to "force" an object/page to recalculate it's formula fields, either through standard or extended controllers? wrong positioning of figure with tabular in xelatex I recently updated MikTex and it seems Xelatex is not able to place figures correctly anymore. Before updating all figures were shown correctly. I work with Texworks and Miktex 2.9  Here it is the code that I run:  \documentclass[10pt,a4paper]{report} \usepackage{graphicx} \graphicspath{{method1/}{method2/}{dpfig/}}  \begin{document}  \begin{figure}[!htbp] \centering \begin{tabular}{cc} \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure1.eps}&amp; \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure2.eps}\\ \end{tabular} \caption{Two figures} \end{figure} \end{document} \end{figure}   With this code, figures are correctly trimmed and the relative position between figure 1 and figure 2 is maintained. However, the position in the document is wrong: figure are placed upper and more right than expected (as the bottom-left corner of the table was placed in the middle of the page). The unusual thing is that this does not happen in draft mode and picture are shown centered as it would be.  I usually compile with Xelatex, Makeindex and Bibtex.  I hope to have been clear.. bye!  EDIT: Sorry, I forgot to add the images I prepared from the file that run that script: In an HTML table, the cellpadding and cellspacing can be set like this:  &lt;table cellspacing="1" cellpadding="1"&gt;   How can the same be accomplished using CSS? How do I make Bash my default shell on Ubuntu? Ubuntu 19.04 problems install upgrades I'm designing an I/O module by using optocouplers for the inputs and outputs which I want to control by a microcontroller.   Here are my questions:   In the datasheet of optocoupler's output current (per channel) is 50mA, and for the output port(figure 1) Relay nominal operating current is 16.7 mA. By knowing these can I calculate how much current will I need for the system. Which parameters do I know?   There are 12 relays, 20 optocouplers (5 module) in total. 3 Opto module for output, 2 for input ports     By directly connecting the GPIO pin and output of the optocoupler to the switches (as input), Can I control the inputs shown in the figures. For the input ports, I don't know how to make the connections. What should I connect to the collector pin? Clean install of Windows 10 OEM: license key issues? Identify geographic location to points I am quite new in QGIS and I really need your help.  I have a map of Kenya divided into 68 districts and I have coordinates of 30.000 schools. The points have one variable besides the latitude and longitude data called "distance to nearest school".   First I imported the map. Then I imported the spreedsheet and transformed it to a SHP file like the map. So now I have two SHP files.    The points have three variables: "Latitude", "Longitude" and "Distance to nearest school". I want to have a fourth variable called "District" and take the mean of the "Distance to nearest school" for each district. Show that AB is singular if A is singular Actually I need to show that $\det(AB) = \det(A)\det(B)$ if $A$ is a singular matrix.  The determinant of $A$ is $0$ if $A$ is singular, so $\det(AB)$ has to be $0$ as well, but I have problems showing that $AB$ is singular if $A$ is singular. How can I show that? I'm considering replacing an outdoor lighting fixture with an LED motion-sensitive fixture, but I'm not sure how to safely do the wiring.  The location is protected (under a porch) but still needs to be weatherproof. Here's the existing fixture and mount:    The obvious replacement would be another lamp that included its own box cover, so that its wiring would be covered and protected. But, the fixture I like doesn't include such a cover:    You can see it's meant to be screwed into the wall, but doesn't cover anything. The power cable ends with bare wires which are meant to be wire-nutted to the supply wiring, probably inside a junction box. But, how do I get the wire safely into the junction box while keeping things weatherproof?  One option would be to replace the lamp's power cable with one ending in a grounded plug, and install a weatherproof outlet box. But that's ugly and complex.  Are there weatherproof junction box covers that include provisions for sealed entry of cables? Where can I find a reference to the format of the comment field (field 5) of the /etc/passwd file? In the /etc/passwd file on my system, the "comment" field, field 5, is inconsistent in its contents.  I thought that I could extract it to get the full name of the user.  fullname=`awk -F: '$1 == name {print $5}' name=$LOGNAME /etc/passwd`   However this returns with $fullname containing a name with 0, 3, or 4 commas following.  Exploring the man page (man 5 passwd) provides no details of this field other than describing it as "user name or comment field."  Perhaps there is additional information that is stored along with the user name? I read in a CSV file for linking to a .shp file.   All the variables that are just numbers came in as text.   How do I change the text variables to numeric in QGIS? How bad for TeX is omitting braces {}, even if the result is the same? Sometimes writing braces and omitting them produces the same result:  \tilde{\psi}  \mathrm{e}^{\mathrm{i} \pi}   vs  \tilde \psi   \mathrm e^{\mathrm i \pi}   Or (taken from Werner's comment below)   \frac{1}{2} vs \frac12   If that's the case, how bad for the quality of my code is omitting them? Of course, if one compiles a pair of formulas, there is no difference. But, since I ignore how TeX works, my point is: if one writes long codes with these habits,   doesn't TeX go somehow crazy because I'm not writing as it expects?   For instance, does it have any effect on how fast are long documents compiled? Any reason to keep them? $a\mid b,\ c\mid d\,\Rightarrow\ ac\mid bd $ $\ \, \bf\small [Divisibility\ Product\ Rule]$ I just need to check the reasoning in my proof is correct, I think it is valid although I'm not totally convinced because I can't follow the logic; does proving that $x$ is an integer prove that $ac|bd$?  Theorem: Let $a$, $b$, $c$, $d$ be integers. If $a|b$ and $c|d$, then $ac|bd$.  Proof: $aj=b$ and $ck=d$ for integers $j$, $k$. Then, $ac|bd$ implies $acx=ajck$ and thus $x=jk$ for some $x$. Since the product $jk$ is an integer, $x$ is an integer and thus $acx=ajck$ and thus $ac|bd$. tarring in parallel An Oceanographer friend at work needs to back up many months worth of data.  She is overwhelmed so I volunteered to do it.  There are hundreds of directories to be backed up and we want to tar/bzip them into files with the same name as the directory.  I can do this easy enough serially - but - I wanted to take advantage of the several hundred cores on my work station.  Question:  using find with the -n -P args or GNU Parallel, how do I tar/bzip the directories, using as many cores as possible while naming the end product:  origonalDirName.tar.bz2?  I have used find to bunzip 100 files simultaneously and it was VERY fast - so this is the way to approach the problem though I do not know how to get each filename to be that of each directory. Fantasy book series with non-human races and labyrinth