<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 09:18:05 Tuesday, 27 October 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
LI.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
DIV.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
TABLE.414e7b50-9f91-49ff-842d-fa8ec507eb62Table {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:427774280;
        mso-list-type:hybrid;
        mso-list-template-ids:-865587516 134807569 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am having trouble renaming a spatialite database that I have been using in QGIS (2.10.1-Pisa).  I have been working in Python, but the problem can be easily recreated through the GUI.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]>Add spatialite layer from sqlite file<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]>Remove spatialite layer (right click, remove)<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]>Rename or delete the sqlite file<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Python gives ‘WindowsError’ in Windows 7, or ‘OSError’ in Xubuntu 14.04.  The Linux terminal gets:<o:p></o:p></p>
<p class="MsoNormal">mv: cannot move ‘test.sqlite’ to ‘test2.sqlite’: Text file busy<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After a few (1-5?) minutes the lock is removed.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With shape file layers, the lock is removed as soon as the layer is removed.  Is there a reason for the delay with the spatialite file?  Is there a command that I can call to refresh/drop the connection more quickly?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">John<o:p></o:p></p>
</div>
<br>
<table class="414e7b50-9f91-49ff-842d-fa8ec507eb62Table" borderColor="black" cellspacing="0" cols="1" cellpadding="0" width="450" border="0">
<tbody>
<tr>
<td>
<p><span style="font-family:Arial; color: #009F94; font-weight: bold; ">John Stevenson</span><br>
<span style="font-family:Arial; font-size:x-small; ">Senior Developer</span> </p>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
<p class="414e7b50-9f91-49ff-842d-fa8ec507eb62"><a href="http://www.thinkwhere.com"><img id="IMG1" border="0" align="right" src="cid:image62d446.PNG@b8f67a6f.44b02e71"></a></p>
</td>
</tr>
<tr>
<td>
<p><font size="2" face="Arial"><font color="#009f94">t:</font> 01786 476060 (Office)<br>
<font color="#009f94">t:</font> 01786 476093 (Direct Dial)<br>
<font color="#009f94">w:</font><a href="http://www.thinkwhere.com">www.thinkwhere.com</a></font>
</p>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
<p align="right"><font size="2" face="Arial">Glendevon House<br>
Castle Business Park<br>
Stirling FK9 4TZ</font></p>
</td>
</tr>
<tr>
<td><a href="https://twitter.com/thinkWhere1"><img id="IMG1" border="0" align="left" src="cid:image4b9582.PNG@2ece2541.49a15f3b"></a>
<a href="http://www.linkedin.com/company/1509510?trk=companies_home_ycp_logo_forth-valley-gis">
<img id="IMG1" border="0" align="left" src="cid:image1d9004.PNG@2583645c.4eb76c05"></a>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
</td>
</tr>
</tbody>
</table>
<br>
<p align="justify"><font color="#7f7f7f" size="1" face="Verdana">This email and its attachments are private and confidential. If you believe you have received this email in error, please contact the sender immediately on 01786 476060. If you are not the intended
 recipient, you may not rely on, use or disclose this email or any attachments in any way.<br>
<br>
thinkWhere Limited does not accept any liability for any damage that may be caused to the recipient's system or data by this email or any attachments. Please note that our email system may be subject to random monitoring by us. This Company accepts no liability
 for personal emails.<br>
<br>
thinkWhere is a limited company registered in Scotland with Registered Number SC315349 and having its Registered Office at Glendevon House, Castle Business Park, Stirling, FK9 4TZ.
</p>
<br>
</font>
<p></p>
<p></p>
<p></p>
</body>
</html>