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

ImportError: cannot import name 'NpipeAdapter' from 'docker.transport' #46

Closed
leungi opened this issue Jul 21, 2019 · 5 comments
Closed
Labels

Comments

@leungi
Copy link

@leungi leungi commented Jul 21, 2019

Inspected the source code for docker package and can't find NpipeAdapter.

Installed packages:

# Name                    Version                   Build  Channel
docker-py                 4.0.2                    py37_0  conda-forge
docker-pycreds            0.4.0                      py_0  conda-forge
#
# Name                    Version                   Build  Channel
pywin32                   224                      pypi_0  pypi
pywinpty                  0.5.5                 py37_1000  conda-forge
> stevedore::docker_available(verbose = T)
#> Failed to create docker client with error message:
#>  ImportError: cannot import name 'NpipeAdapter' from 'docker.transport' 
#> (C:\Users\leungi\CONDA~1\envs\azureML\lib\site-packages\docker\transport\__init__.py)
@richfitz
Copy link
Owner

@richfitz richfitz commented Aug 27, 2019

I could not replicate this locally, but travis is now seeing something related https://travis-ci.org/richfitz/stevedore/builds/577334116

@aornugent
Copy link

@aornugent aornugent commented Oct 9, 2019

Hia, same problem on Windows Server:

> stevedore:::httppipe_available(verbose = TRUE)
Failed to load httppipe with error message:
  ImportError: cannot import name 'NpipeAdapter' from 'docker.transport' (C:\PROGRA~3\ANACON~1\lib\site-packages\docker\transport\__init__.py)
[1] FALSE
pip freeze
docker==4.1.0
pypiwin32==223
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_3.6.1  Matrix_1.2-17   tools_3.6.1     curl_4.2       
 [5] Rcpp_1.0.1      reticulate_1.13 grid_3.6.1      jsonlite_1.6   
 [9] stevedore_0.9.1 lattice_0.20-38
@richfitz
Copy link
Owner

@richfitz richfitz commented Nov 5, 2019

Looks like this changed name to NpipeHTTPAdapter at 4d7d4084138fa6161ef5f31d410b0d326d41f777, so we may need to do a bit of a version switching check around the import

@richfitz
Copy link
Owner

@richfitz richfitz commented Jan 12, 2020

This should be fixed now, with a new version (0.9.3) submitted to CRAN

@richfitz richfitz closed this Jan 12, 2020
@leungi
Copy link
Author

@leungi leungi commented Jan 12, 2020

Verified; thanks!

> reticulate::use_python("C:/Users/leungi/AppData/Local/Continuum/miniconda3/python.exe")
> stevedore::docker_available()
Detected API version '1.40' is above max version '1.39'; downgrading
[1] TRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.