<div dir="ltr"><div dir="ltr"><div>now I&#39;m confused (my usual state...) I am in fact running the identical driver on both branches and it is running as part of chirpw and chirpc. I fixed the syntax errors in run_tests on the py3 branch and stripped almost all drivers out of the drivers directory. That&#39;s what I&#39;ve been running to pass the unit test on the py3 branch since you told me how:</div><div>dgc@vivomini /export/srcs/CHIRP3/chirp.hg/tests $ ./run_tests -d Yaesu_FT-4XR<br>Failed to import /export/srcs/CHIRP3/chirp.hg/chirp/drivers/rfinder: invalid syntax (rfinder.py, line 290)<br>    Yaesu FT-4XR        Clone       PASSED: All tests<br>    Yaesu FT-4XR        Edges       PASSED: All tests<br>    Yaesu FT-4XR        BruteForce  PASSED: All tests<br>    Yaesu FT-4XR        CopyAll     PASSED: All tests<br>    Yaesu FT-4XR        Banks       PASSED: All tests<br>    Yaesu FT-4XR        Detect      PASSED: All tests<br>    Yaesu FT-4XR        Settings    PASSED: All tests<br>----------------------------------------------------------------------<br>Results:<br>  TOTAL  : 7<br>  PASSED : 7<br>  SKIPPED: 0<br>  FAILED : 0<br>  CRASHED: 0<br><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 17, 2019 at 3: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; OK, I did in fact make my driver work on both py3 and the (py2) main branch. I built my image into a bytearray, then converted to bytes,<br>
&gt; use MemoryMap:<br>
&gt;        bytearraymmap = bytearray(radio._imagesize)<br>
&gt;        readimageinto bytearray(bytearraymmap)<br>
&gt;        self._mmap= memmap.MemoryMap(bytes(bytearraymmap))<br>
<br>
You might be able to run stuff against your driver in the main branch, but you can&#39;t run the whole app, and the run_tests.py file isn&#39;t even syntax-compatible under python3:<br>
<br>
&gt; $ python3 tests/run_tests.py<br>
&gt;   File &quot;tests/run_tests.py&quot;, line 134<br>
&gt;     except Exception, e:<br>
&gt;                     ^<br>
&gt; SyntaxError: invalid syntax<br>
<br>
&gt; This code works in both places. The py3 version will eventually need to be cleaned up to use the MemoryMapBytes, simply to avoid the<br>
&gt; array copy, but that&#39;s minor. We could add a stub version of MemoryMapBytes to py2 to simplify the transition.<br>
<br>
<br>
If you meant the same driver file can work on the default and py3 branch, then sure, that&#39;s just not what I meant.<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>