<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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Open Sans";
        panose-1:2 11 6 6 3 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Georgia",serif;
        font-variant:normal !important;
        color:windowtext;
        text-transform:none;
        mso-contextual-alternates:no;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;
        vertical-align:baseline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">He Yoann and the Plugin Reloader author
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">Thanks for finding that. I can confirm it was the same problem in my case. Also tested and found that renaming the folder the plugin files are in (in my case from <plugin
 name> to folder_<plugin name> ) solves the problem just as well.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">I do consider this a workaround to what actually is  a Plugin Reloader bug, as the "normal" setup is the folder having the same name as the plugin itself – that's also
 the way that the Plugin Builder delivers the "examples plugin"...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">I actually found that a bug was filed for this (but for some strange reason closed without having been solved), so I commented on that in the bug tracker (</span><a href="https://github.com/borysiasty/plugin_reloader/issues/20">https://github.com/borysiasty/plugin_reloader/issues/20</a><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Georgia",serif">yours,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Georgia",serif">--<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Georgia",serif">Barend Köbben<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal">On 22/03/2019, 15:18, "Yoann QUENACH" <<a href="mailto:yquenach@itlink.fr">yquenach@itlink.fr</a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Hi Barend, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I encountered the exact same problem no too long ago: plugin works fine, but as soon as I try to reload it using PluginReloader, this annoying import error occurs.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">My problem was the plugin python file had the same name as its containing folder (which should not be a problem, but causes weird relative import errors with PluginReloader), so a quick fix was to rename the python file with a _plugin suffix.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b>So this layout <span style="color:red">fails</span>:</b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><pluginname><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">|-----  __init__.py<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">|-----   <pluginname>.py  <---- relative import inside<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">|-----   otherfile.py <o:p></o:p></p>
</div>
<p class="MsoNormal">|-----   ... <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b>while this one does not</b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><pluginname><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">|-----  __init__.py<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">|-----   <pluginname>_plugin.py  <---- relative import inside<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">|-----   otherfile.py <o:p></o:p></p>
</div>
<p class="MsoNormal">|-----   ...  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I can only assume that PluginReloader does not correctly clean up everything while reloading plugins...<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Le mar. 19 mars 2019 à 15:43, <<a href="mailto:b.j.kobben@utwente.nl">b.j.kobben@utwente.nl</a>> a écrit :<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">Hi all,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">as a follow-up to my earlier question (below), I have now embarked on the slow (but fun!) process of learning
 how to create a Python Processing Plugin. I have successfully build a skeleton one using the Plugin Builder, managed to get my PyCharm IDE to work with the qgis.core library and thus can get to developing my own.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif">However, I keep having to uninstall my plugin, quit Qgis, deploy a new version to the plugins dir and then
 re-start Qgis, which works fine, but is a bit of a pain. I have to do this because the Plugin Reloader keeps failing to reload it "in place" with the message:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:10.0pt">"</span><span style="font-size:10.0pt">2019-03-19T15:25:42     WARNING    Traceback (most recent call last):<br>
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 309, in loadPlugin<br>
              __import__(packageName)<br>
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 672, in _import<br>
              mod = _builtin_import(name, globals, locals, fromlist, level)<br>
              File "/Users/barendkobben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/origin_destination_points_to_flow_lines/origin_destination_points_to_flow_lines.py", line 38, in
<br>
              from .origin_destination_points_to_flow_lines_provider import OriginDestinationPointsToFlowLinesProvider<br>
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 672, in _import<br>
              mod = _builtin_import(name, globals, locals, fromlist, level)<br>
             ImportError: attempted relative import with no known parent package</span><span lang="EN-GB" style="font-size:10.0pt">"</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:12.0pt;font-family:"Georgia",serif">This seems strange, because when loading it the first time there is no problem with "no known parent package". Can anybody
 tell me why this happens (and how to solve it  hopefully)...?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Georgia",serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Georgia",serif">--</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Georgia",serif">Barend Köbben</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0cm 0cm 0cm 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, 14 Mar 2019 at 00:51, <<a href="mailto:b.j.kobben@utwente.nl" target="_blank">b.j.kobben@utwente.nl</a>> wrote:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:12.0pt;font-family:"Georgia",serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Many of my students used the FlowMapper plugin to create flowmaps from Origin-Destination data. Unfortunately development has stopped in may 2016 and therefore a GQIS 3.x compatible
 version never came. From the plugins page at <a href="https://plugins.qgis.org/plugins/FlowMapper/" target="_blank">
https://plugins.qgis.org/plugins/FlowMapper/</a> and the github repository at <a href="https://github.com/cempro/flowmapper" target="_blank">
https://github.com/cempro/flowmapper</a> I cannot seem to find anything on the developer (other then his 'cempro' moniker).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Does anyone know of the status of this plugin, if an alternative is available, or any other useful info?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">yours,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Barend Köbben<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr style="height:124.0pt">
<td valign="top" style="padding:5.0pt 5.0pt 5.0pt 5.0pt;height:124.0pt">
<p style="margin:0cm;margin-bottom:.0001pt"><a href="https://www.itlink.fr/" target="_blank"><span style="color:windowtext;text-decoration:none"><span style="font-family:"Open Sans",sans-serif;color:#1155CC;border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="145" height="145" style="width:1.5104in;height:1.5104in" id="_x0000_i1025" src="cid:~WRD000.jpg" alt="Image removed by sender."></span></span></a><o:p></o:p></p>
</td>
<td valign="top" style="padding:5.0pt 5.0pt 5.0pt 5.0pt;height:124.0pt">
<p style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-size:14.0pt;font-family:"Verdana",sans-serif;color:#00337E"><br>
<br>
</span></b><o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-size:14.0pt;font-family:"Verdana",sans-serif;color:#00337E">Yoann Quenach de Quivillic</span></b><o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-family:"Verdana",sans-serif;color:#2395F4">Ingénieur d'étude</span></b><o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-family:"Verdana",sans-serif;color:#2395F4"><br>
<br>
</span></b><o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><a href="https://www.itlink.fr/" target="_blank"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1155CC">www.itlink.fr</span></a><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>