<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks! This worked.  <br>
      <br>
      stage_packages should have worked too.  I wonder if this debian
      archive bug is related to why it didn't work:<br>
      <a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/lazr.restfulclient/+bug/1500460">https://bugs.launchpad.net/lazr.restfulclient/+bug/1500460</a><br>
      <br>
      I added my info to this bug.<br>
      <br>
      <br>
      On 06/27/2016 11:59 AM, Kyle Fazzari wrote:<br>
    </div>
    <blockquote cite="mid:57716989.4020303@canonical.com" type="cite">
      <pre wrap="">On 06/27/2016 01:55 PM, Sergio Schvezov wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">

El 27/06/16 a las 14:29, John Agosta escribió:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi:
</pre>
        </blockquote>
        <pre wrap="">
Hi there!

</pre>
        <blockquote type="cite">
          <pre wrap="">I am attempting to create a launchpad API part and have run into an
issue with the snap correctly resolving lazr.restfulclient.
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">The error I get is:

       Traceback (most recent call last):
         File "/snap/lptools-john/x2/usr/bin/testreport.py", line 9, in
    <module>
           from launchpadlib.launchpad import Launchpad
         File
    "/snap/lptools-john/x2/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py",
    line 33, in <module>
           from lazr.restfulclient.resource import (
       ImportError: No module named lazr.restfulclient.resource
</pre>
        </blockquote>
        <pre wrap="">
I am not entirely sure what is up with this module coming from the
debian package in the archives but Kyle (CCed) has had success with this
by grabbing the package from pypi directly using the `python-packages`
keyword.
</pre>
      </blockquote>
      <pre wrap="">
Indeed. I've not investigated this enough to know for sure, but it seems
that the lazr deb doesn't contain the correct __init__.py files. I
suspect they're setup after the fact, e.g. in a postinst. Anyway, as
Sergio said, I was able to work around it by using `python-packages`
instead. My use-case was launchpadlib as well, so you might find this
useful:

    <a class="moz-txt-link-freetext" href="https://github.com/kyrofa/cla-check/blob/master/snapcraft.yaml">https://github.com/kyrofa/cla-check/blob/master/snapcraft.yaml</a>

--
Kyle Fazzari (kyrofa)
Software Engineer
Canonical Ltd.
<a class="moz-txt-link-abbreviated" href="mailto:kyle@canonical.com">kyle@canonical.com</a>

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
John Agosta

Program Manager, snappy Ubuntu Core and Internet of Things
UES Commercial Device Operations 
Canonical USA, LTD
<a class="moz-txt-link-abbreviated" href="mailto:John.Agosta@Canonical.com">John.Agosta@Canonical.com</a>
+1 (970) 217-5115

Ubuntu: creating the world’s best open source software platform
</pre>
  </body>
</html>