gana2188 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

Google Cloud SDK - GAE 1.9.18 produces docker error on Windows #125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Installed latest version of Google Cloud SDK on Windows 7 (and same issue on 
Windows 8.1 PC too).  Trying to launch via GAE Launcher using Cloud SDK on 
local system does not work.

What is the expected output? What do you see instead?
2015-04-02 11:44:06 Running command: "['C:\\Python27\\pythonw.exe', 
'C:\\Program Files\\Google\\Cloud 
SDK\\google-cloud-sdk\\platform\\google_appengine\\dev_appserver.py', 
'--skip_sdk_update_check=yes', '--port=8082', '--admin_port=8003', 
'C:\\Users\\acollins\\workspace\\src\\goandgiveuk']"
Traceback (most recent call last):
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 83, in <module>
    _run_file(__file__, globals())
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 36, in <module>
    from google.appengine.tools.devappserver2 import dispatcher
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", line 29, in <module>
    from google.appengine.tools.devappserver2 import module
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\module.py", line 71, in <module>
    from google.appengine.tools.devappserver2 import vm_runtime_factory
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\vm_runtime_factory.py", line 25, in <module>
    from google.appengine.tools.devappserver2 import vm_runtime_proxy
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\vm_runtime_proxy.py", line 29, in <module>
    from google.appengine.tools.devappserver2 import log_manager
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\log_manager.py", line 34, in <module>
    from google.appengine.tools.docker import containers
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\docker\containers.py", line 47, in <module>
    import docker
ImportError: No module named docker
2015-04-02 11:44:12 (Process exited with code 1)

What is the output of 'gcloud info'?
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\acollins>cd\

C:\>gcloud info
Google Cloud SDK [0.9.54]

Platform: [Windows, x86]
Python Version: [2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit 
(Intel)]]
Site Packages: [Disabled]

Installation Root: [C:\Program Files\Google\Cloud SDK\google-cloud-sdk]
Installed Components:
  app-engine-python: [1.9.18]
  gae-java: [1.9.18]
  app-engine-python-extras: [1.9.18]
  gsutil: [4.11]
  gcutil: [1.16.5]
  core-win: [2015.03.10]
  gcloud: [2015.04.01]
  gsutil-win: [4.6]
  dns: [2015.03.23]
  app-engine-go-windows-x86: [1.9.18]
  gae-go-win: [2014.10.14]
  core: [2015.04.01]
  gae-python: [2014.05.06]
  gae-java-win: [1.9.15]
  windows-ssh-tools: [2015.03.13]
  bq: [2.0.18]
  gae-go: [2015.04.01]
  sql: [2015.03.23]
  bq-win: [2.0.18]
  compute: [2015.04.01]
  gcutil-win: [1.16.5]
  gae-python-launcher-win: [1.9.18]
System PATH: [C:\Program Files\Google\Cloud 
SDK\google-cloud-sdk\bin\..\bin\sdk;C:\Program Files\NVIDIA Corporation\Phys
X\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\W
indows\system32\wbem;C:\Python33;C:\Wind
ows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program 
Files\Common Files\Intel\WirelessCommon;C
:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\WIDCOMM\Bluetooth 
Software;C:\Program Files\Java\jre7\bin;
C:\msysgit\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs;;C:\Program 
Files\NTP\bin;C:\Program Files\TortoiseGit\b
in;C:\Program Files\Mercurial;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Program 
Files\QuickTime\QTSystem;C:\Program Files\To
rtoiseSVN\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft 
SQL Server\110\Tools\Binn\;C:\Program File
s\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\MiKTeX 
2.9\miktex\bin\;C:\Program Files\Intel\WiFi\bin\;C:\Progr
am Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Google\Cloud 
SDK\google-cloud-sdk\bin;C:\Program Files\Goog
le\Cloud SDK\google-cloud-sdk.staging\bin;C:\Go\bin;C:\Program 
Files\Scrivener;C:\Program Files\Java\jre7\bin;C:\Program
 Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\]
Cloud SDK on PATH: [True]

Installation Properties: [C:\Program Files\Google\Cloud 
SDK\google-cloud-sdk\properties]
User Config Directory: [C:\Users\acollins\AppData\Roaming\gcloud]
User Properties: [C:\Users\acollins\AppData\Roaming\gcloud\properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [alistaircollins21@gmail.com]
Project: [None]

Current Properties:
  [core]
    account: [alistaircollins21@gmail.com]
    disable_usage_reporting: [False]

Original issue reported on code.google.com by alistair...@gmail.com on 2 Apr 2015 at 10:54

GoogleCodeExporter commented 9 years ago
See also: 
http://stackoverflow.com/questions/28879485/unable-to-start-appengine-applicatio
n-after-updating-it-via-google-cloud-sdk

Original comment by alistair...@gmail.com on 2 Apr 2015 at 10:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
same as on OS X

   from google.appengine.tools.devappserver2 import vm_runtime_factory
  File "/Users/sjo/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_factory.py", line 25, in <module>
    from google.appengine.tools.devappserver2 import vm_runtime_proxy
  File "/Users/sjo/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_proxy.py", line 29, in <module>
    from google.appengine.tools.devappserver2 import log_manager
  File "/Users/sjo/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/log_manager.py", line 34, in <module>
    from google.appengine.tools.docker import containers
  File "/Users/sjo/google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py", line 47, in <module>
    import docker
ImportError: No module named docker

Original comment by s...@blinkfire.com on 9 May 2015 at 11:32

GoogleCodeExporter commented 9 years ago
Please change to High priority.  It doesn't run.  How can it be medium 
priority?????????????

Original comment by s...@blinkfire.com on 9 May 2015 at 11:32

GoogleCodeExporter commented 9 years ago
Hi, can you please try installing the App Engine SDK from here: 
https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python

instead of through gcloud?

Original comment by dlor...@google.com on 9 May 2015 at 7:48

GoogleCodeExporter commented 9 years ago
Yes, I already know that works, but once you do that, you end up with 2 
installations of GAE and then "gcloud update components" doesn't work because 
the permissions on OS X are all messed up.  That bug is in here somewhere too.  
I have 4 macs, and it's easily replicable on all 4.  That's issue #35 marked as 
"won't fix" yet it is still a bug 
https://code.google.com/p/google-cloud-sdk/issues/detail?id=35    Can you 
please just fix this bug?  Pretty please?  With sugar on top?

Original comment by s...@blinkfire.com on 9 May 2015 at 8:59

GoogleCodeExporter commented 9 years ago
Still the same error with 1.9.19.229.

Original comment by jeff.oneill on 12 May 2015 at 2:01

GoogleCodeExporter commented 9 years ago
This answer appears to work: http://stackoverflow.com/a/28883237/201618
From command line run: pip install docker-py

Original comment by alistair...@gmail.com on 21 May 2015 at 9:53

GoogleCodeExporter commented 9 years ago
Why dont you fix this issue?? This is easily replicable...

Original comment by palacios...@gmail.com on 25 May 2015 at 1:38

GoogleCodeExporter commented 9 years ago
Still the same error with 1.9.20.242 on OS X.

Original comment by jeff.oneill on 30 May 2015 at 5:11

GoogleCodeExporter commented 9 years ago
Thanks for pinging this.  We're tracking this bug internally and are working 
figuring out next steps toward a fix.

Original comment by jeffvaug...@google.com on 1 Jun 2015 at 8:50

GoogleCodeExporter commented 9 years ago
This should be fixed with gcloud 0.9.61 and 
app-engine-python 1.9.20

If you're still seeing this could you attach the output of "gcloud version", 
and the exact command you ran?

Original comment by dlor...@google.com on 1 Jun 2015 at 9:04

GoogleCodeExporter commented 9 years ago
I'm on OS X 10.10.1.

Output of "gcloud version" below.

Steps:
(1) Double click google-cloud-sdk/bin/GoogleAppEngineLauncher.app
(2) Click the green Run button on the GAE launcher
(3) Logs show an error message as in the original issue

===

$ gcloud version
Google Cloud SDK 0.9.61

app-engine-go-darwin-x86_64 1.9.20
app-engine-java 1.9.20
app-engine-python 1.9.20
app-engine-python-extras 1.9.20
bq 2.0.18
bq-nix 2.0.18
compute 2015.05.19
core 2015.05.19
core-nix 2014.10.20
dns 2015.05.19
gae-python 2014.05.06
gae-python-launcher-mac 1.9.20
gcloud 2015.05.19
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.12
gsutil-nix 4.6
kubectl 
kubectl-darwin-x86_64 0.17.0
preview 2015.05.19
sql 2015.05.06

Original comment by jeff.oneill on 1 Jun 2015 at 9:24

GoogleCodeExporter commented 9 years ago
For everyone needing a work-around, Alistairs mention in #8 worked for me and 
allowed me to run locally again with the GAE launcher. (updating GAE launcher 
on OS X didn't):

"This answer appears to work: http://stackoverflow.com/a/28883237/201618
From command line run: pip install docker-py"

Original comment by k...@q42.nl on 2 Jun 2015 at 9:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had this working previously with "pip install docker-py".

Now, after today upgrading to Google Cloud SDK [0.9.63] & app-engine-python: 
[1.9.21], I get the error:
...
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\docker\containers.py", line 48, in <module>
    from docker import docker
ImportError: cannot import name docker
2015-06-06 16:47:59 (Process exited with code 1)

I've tried uninstalling docker-py but that brings-back the old "ImportError: No 
module named docker" error. With the package installed I get the new error. 
Either way, I'm again unable to run any apps in the launcher. Very frustrating.

Original comment by arile...@gmail.com on 6 Jun 2015 at 6:52

GoogleCodeExporter commented 9 years ago
I was able to get my apps working again with the following hack:
In containers.py on line 48 change "from docker import docker" to just "import 
docker"

I'm not a python developer so I don't know if this is a good or bad change to 
make, but my PHP & Go apps are running again.

Original comment by arile...@gmail.com on 6 Jun 2015 at 8:55

GoogleCodeExporter commented 9 years ago
I can't change the file! it keeps saying the file is open somewhere else

Original comment by DanielFi...@gmail.com on 10 Jun 2015 at 6:28

GoogleCodeExporter commented 9 years ago
This issue is still there with gcloud 0.9.66 & GAE 1.9.21

C:\Users\Developer>gcloud version
Google Cloud SDK 0.9.66

app 2015.06.22
app-engine-go-windows-x86_64 1.9.21
app-engine-java 1.9.21
app-engine-python 1.9.21
app-engine-python-extras 1.9.21
bq 2.0.18
bq-win 2.0.18
compute 2015.06.22
core 2015.06.22
core-win 2015.06.02
dns 2015.06.22
gae-python 2015.06.02
gae-python-launcher-win 1.9.21
gcloud 2015.06.22
gcutil 1.16.5
gcutil-msg 2015.06.09
gsutil 4.13
gsutil-win 4.12
preview 2015.06.22
sql 2015.06.22
windows-ssh-tools 2015.06.02

Original comment by niji...@gmail.com on 30 Jun 2015 at 7:27

GoogleCodeExporter commented 9 years ago
Not just a Windows issue, happening on OS X 10.10.3

gcloud version
Google Cloud SDK 0.9.66

app 2015.06.22
app-engine-go-darwin-x86_64 1.9.21
app-engine-java 1.9.21
app-engine-python 1.9.21
bq 2.0.18
bq-nix 2.0.18
compute 2015.06.22
core 2015.06.22
core-nix 2015.06.02
dns 2015.06.22
gcloud 2015.06.22
gcutil-msg 2015.06.09
gsutil 4.13
gsutil-nix 4.12
preview 2015.06.22
sql 2015.06.22

Original comment by skow...@gmail.com on 30 Jun 2015 at 6:29

GoogleCodeExporter commented 9 years ago
On Win 8.1

Google Cloud SDK 0.9.67

app-engine-python 1.9.23
app-engine-python-extras 1.9.21
bq 2.0.18
bq-win 2.0.18
core 2015.06.30
core-win 2015.06.02
gae-python 2015.06.02
gae-python-launcher-win 1.9.23
gcloud 2015.06.30
gcutil-msg 2015.06.09
gsutil 4.13
gsutil-win 4.12
preview 2015.06.30
windows-ssh-tools 2015.06.02

the error on the Log Window is:

2015-07-03 14:58:32 Running command: "['C:\\Python27\\pythonw.exe', 
'C:\\Program Files\\Google\\Cloud 
SDK\\google-cloud-sdk\\platform\\google_appengine\\dev_appserver.py', 
'--skip_sdk_update_check=yes', '--port=9080', '--admin_port=8001', 
'D:\\ProjectosPython\\wtv-polls\\default']"
Traceback (most recent call last):
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 83, in <module>
    _run_file(__file__, globals())
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 36, in <module>
    from google.appengine.tools.devappserver2 import dispatcher
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", line 29, in <module>
    from google.appengine.tools.devappserver2 import module
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\module.py", line 75, in <module>
    from google.appengine.tools.devappserver2 import vm_runtime_factory
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\vm_runtime_factory.py", line 25, in <module>
    from google.appengine.tools.devappserver2 import vm_runtime_proxy
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\vm_runtime_proxy.py", line 29, in <module>
    from google.appengine.tools.devappserver2 import log_manager
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\log_manager.py", line 34, in <module>
    from google.appengine.tools.docker import containers
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\docker\containers.py", line 48, in <module>
    from docker import docker
ImportError: cannot import name docker
2015-07-03 14:58:36 (Process exited with code 1)

Original comment by alex.fra...@wtvision.com on 3 Jul 2015 at 2:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Can confirm that this is happening on Ubuntu.  Just did an update of the python 
app engine component.

Two changes:

1) `dev_appserver.py` is no longer on my path
2) When run directly, I get: `ImportError: cannot import name docker`

This is holding me up now as I was depending on the local server for 
development.  Is there any way we can get a rush put on this issue?

Original comment by atrauzzi on 9 Jul 2015 at 5:04

GoogleCodeExporter commented 9 years ago
The removal of dev_appserver.py is intended behavior. As stated in the 
RELEASE_NOTES for Cloud SDK version 0.9.68 
(https://dl.google.com/dl/cloudsdk/release/RELEASE_NOTES):

  - The standalone App Engine SDKs are no longer distributed through the Cloud
    SDK.
      - App Engine functionality can still be used through the
        `gcloud preview app` command group.
      - The gae-java, gae-python, gae-php, and gae-go components no longer
        exist in the component manager.
      - If you need to use appcfg or dev_appserver directly, these are still
        available in the App Engine SDK downloads that can be found here:
        https://cloud.google.com/appengine/downloads

We are removing dev_appserver, since it's functionality is being replace by 
`gcloud app`.

If you need to pin to an old version of the Cloud SDK, follow the instructions 
here: https://cloud.google.com/sdk/#install-version

Original comment by z...@google.com on 9 Jul 2015 at 5:12

GoogleCodeExporter commented 9 years ago
Is `gcloud app` available right now?  I just ran it and got: ERROR: (gcloud) 
Invalid choice: 'app'. Did you mean 'auth'?

Original comment by atrauzzi on 9 Jul 2015 at 5:16

GoogleCodeExporter commented 9 years ago
Use `gcloud preview app` in older versions

Original comment by ernestok...@gmail.com on 9 Jul 2015 at 5:18

GoogleCodeExporter commented 9 years ago
`gcloud app` is in preview. To use it, run `gcloud components update app`, and 
invoke it as `gcloud preview app`.

Original comment by z...@google.com on 9 Jul 2015 at 5:20

GoogleCodeExporter commented 9 years ago
This is no longer relevant due to our effort to streamline the App Engine 
integration into the Cloud SDK: we've stopped bundling 
appcfg.py/dev_appserver.py. Please download the AppEngine SDK at 
<https://cloud.google.com/appengine/downloads>.

The feedback we've been getting has been that bundling the appcfg/devappserver 
tools with the Cloud SDK isn't especially useful to developers over just using 
the tools in the stand-alone SDKs, but it does significantly complicate using 
the Cloud SDK itself (lots of extra large components, and it's not clear which 
need to be installed, as well as bugs like this).

Focusing the Cloud SDK on "gcloud app deploy" and "gcloud app run" to run and 
deploy GAE apps allows us to focus on building a lightweight tool that installs 
quickly and works well for all languages. It also helps simplify our release 
and testing approach for the SDK as a whole.

We're trying to make sure we've done any such potentially breaking clean-up 
before removing the 'preview' label from gcloud app.

If you're hitting rough edges because of this change please file issues on this 
tracker.

Original comment by z...@google.com on 13 Jul 2015 at 6:26

GoogleCodeExporter commented 9 years ago
Google Cloud SDK 0.9.70 still has this docker import error

File 
"/usr/local/google/home/jiac/google-cloud-sdk/platform/google_appengine/google/a
ppengine/tools/docker/containers.py", line 48, in <module>
    from docker import docker
ImportError: cannot import name docker

I've got docker-py installed. I changed the importing line of container.py to: 
import docker and the issue is fixed.

Hope this helps
Jacob

Original comment by j...@google.com on 24 Jul 2015 at 3:05

GoogleCodeExporter commented 9 years ago
Thanks for the report, Jacob.

We'll look into this.

Original comment by z...@google.com on 24 Jul 2015 at 3:13

GoogleCodeExporter commented 9 years ago
Hi Jacob,

Can you provide more details on how to reproduce the import issue?

Thanks.

Original comment by vil...@google.com on 24 Jul 2015 at 3:57

GoogleCodeExporter commented 9 years ago
The fix in #29 works like a charm. Maybe somebody at google can include this in 
the SDK version? (I can image newbe developers would have a better experience 
when fixed in the download)?

Original comment by k...@q42.nl on 12 Aug 2015 at 8:04

GoogleCodeExporter commented 9 years ago
Unfortunately, it's a little more complicated than that. The fix from #29 will 
break some installs, while fixing others.

We do have a plan to fix this, but it may be a few more releases before the fix 
gets out.

Original comment by z...@google.com on 12 Aug 2015 at 10:16