<div dir="ltr"><div>AHH! This explains why I was getting funny results for the UI STEP list in ft4. Fortunately, I needed an internal</div><div>lookup list that differed from the list of &quot;legal&quot; values I sent to the UI, so I had already forced a true separate copy</div><div>before I did the remove, so it&#39;s NOT MY FAULT (for once). There is no substitute for sheer dumb luck.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 26, 2019 at 12:24 PM Dan Smith via chirp_devel &lt;<a href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; Thanks for finding the root cause of this problem. I tried to figure<br>
&gt; it out but didn&#39;t quite look hard enough. I also didn&#39;t have any<br>
&gt; success with solving the STEP error that is being generated for those<br>
&gt; trying to program their UV-6R.<br>
<br>
No problem! I kinda caused the acute user-facing issue with my recent change of the defaults. I knew that was going to cause the rash of issues that is has, but I think it&#39;s important to just flush them out and get them fixed, so I&#39;ve been trying to jump on them.<br>
<br>
One thing we can do to try to be more defensive about such things in the future, is use tuples for immutable lists of things. Since they can&#39;t be modified they will help defend against such things (and is the trick I used to figure out who was being naughty in this case):<br>
<br>
&gt; &gt;&gt;&gt; foo = [1,2,3]<br>
&gt; &gt;&gt;&gt; foo.remove(2)<br>
&gt; &gt;&gt;&gt; bar = (1,2,3)<br>
&gt; &gt;&gt;&gt; bar.remove(2)<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
&gt; AttributeError: &#39;tuple&#39; object has no attribute &#39;remove&#39;<br>
&gt; &gt;&gt;&gt; bar[0] = 1<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
&gt; TypeError: &#39;tuple&#39; object does not support item assignment<br>
<br>
By changing uv5r.STEPS to a tuple for a sec, it caused loading of the other driver to fail like the above.<br>
<br>
--Dan<br>
_______________________________________________<br>
chirp_devel mailing list<br>
<a href="mailto:chirp_devel@intrepid.danplanet.com" target="_blank">chirp_devel@intrepid.danplanet.com</a><br>
<a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel" rel="noreferrer" target="_blank">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br>
Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers" rel="noreferrer" target="_blank">http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><br>
</blockquote></div>