Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splitdrive import issue on docker-compose==1.16.0 #5156

Closed
kakawait opened this issue Sep 1, 2017 · 8 comments
Closed

splitdrive import issue on docker-compose==1.16.0 #5156

kakawait opened this issue Sep 1, 2017 · 8 comments
Milestone

Comments

@kakawait
Copy link

kakawait commented Sep 1, 2017

Using Python 2.7.5 with docker-compose==1.16.0 through pip install --upgrade docker-compose==1.16.0

Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from compose.utils import splitdrive
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/compose/utils.py", line 15, in <module>
    from .config.errors import ConfigurationError
  File "/usr/lib/python2.7/site-packages/compose/config/__init__.py", line 6, in <module>
    from .config import ConfigurationError
  File "/usr/lib/python2.7/site-packages/compose/config/config.py", line 15, in <module>
    from . import types
  File "/usr/lib/python2.7/site-packages/compose/config/types.py", line 17, in <module>
    from compose.utils import splitdrive

Whereas using docker-compose==1.15.0 through pip install --upgrade docker-compose==1.15.0

(tested using docker-compose==1.15.0 and docker-compose==1.14.0 both are working)

Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from compose.utils import splitdrive
>>>

PS: I'm not using docker-compose python by myself, but it used by Ansible docker-service module and with docker-compose==1.16.0 I got that message

"msg": "Unable to load docker-compose. Try `pip install docker-compose`. Error: cannot import name splitdrive"
@shin-
Copy link

shin- commented Sep 1, 2017

As I said before, we make no guarantee of a stable API for developers attempting to use Compose as a library.

@mkozjak
Copy link

mkozjak commented Sep 3, 2017

For those of you who are trying to use boot2docker image (docker-machine, Tiny Core Linux) on macos with ansible through its docker module... Downgrade docker-compose pip library to 1.9.0.

If you're only downgrading to 1.15.0, you'll hit #4401.

@j00bar
Copy link

j00bar commented Sep 11, 2017

@shin- This isn't about importing from Ansible, I don't think. That traceback is a circular import. Importing compose.utils begins an import series that breaks when it tries to import compose.utils again. Looking to see if I can identify the breaking change....

@j00bar
Copy link

j00bar commented Sep 11, 2017

The import that kicks off the chain was introduced recently: 6e802df#diff-7345a7e448db63ef1a5b786900e2b7b4R15

@j00bar
Copy link

j00bar commented Sep 12, 2017

For those in Ansible land, this issue does not manifest in devel or the 2.4 rc's. So either limit yourself to Docker Compose <1.16 or upgrade from Ansible 2.3.x into 2.4/devel.

@shin-
Copy link

shin- commented Sep 12, 2017

I'm aware it is a circular import. It just does not affect the software when used as intended. I'll work on a fix when I return from vacation. Thank you for your patience.

@j00bar
Copy link

j00bar commented Sep 12, 2017

Enjoy your time off! Thanks!

@j00bar
Copy link

j00bar commented Oct 2, 2017

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants