On 06/27/2016 01:55 PM, Sergio Schvezov wrote:
> 
> 
> El 27/06/16 a las 14:29, John Agosta escribió:
>> Hi:
> 
> Hi there!
> 
>> I am attempting to create a launchpad API part and have run into an
>> issue with the snap correctly resolving lazr.restfulclient.
> 
>> 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
> 
> 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.

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:

    https://github.com/kyrofa/cla-check/blob/master/snapcraft.yaml

--
Kyle Fazzari (kyrofa)
Software Engineer
Canonical Ltd.
[email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
Snapcraft mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to