gclient sync fails at src/build/android/play_services/update.py

325 views
Skip to first unread message

Deepanjan Roy

unread,
Aug 28, 2017, 1:33:37 PM8/28/17
to Chromium-dev
Hi,

I'm trying to run a gclient sync on tip of tree chromium, and seeing the following error: 

________ running '/usr/bin/python src/build/android/play_services/update.py download' in '/usr/local/google/home/dproy/code/chromium'
Traceback (most recent call last):
  File "src/build/android/play_services/update.py", line 21, in <module>
    import devil_chromium
  File "src/build/android/play_services/../devil_chromium.py", line 10, in <module>
    from pylib.constants import host_paths
  File "src/build/android/play_services/../pylib/constants/__init__.py", line 98, in <module>
    ANDROID_SDK_VERSION = version_codes.O
AttributeError: 'module' object has no attribute 'O'
Error: Command '/usr/bin/python src/build/android/play_services/update.py download' returned non-zero exit status 1 in /usr/local/google/home/dproy/code/chromium

Is anyone else experiencing the same issue? 

- Deep

Andrew Grieve

unread,
Aug 28, 2017, 1:50:31 PM8/28/17
to Deepanjan Roy, Chromium-dev
I'd double-check that gclient sync properly synced your //third_party/catapult directory. Looks like "O" is there: https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/sdk/version_codes.py?type=cs&q=version_codes&sq=package:chromium&l=7

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/05a559dc-1632-4497-9f8e-8dc493d81076%40chromium.org.

Deepanjan Roy

unread,
Aug 28, 2017, 2:04:26 PM8/28/17
to Christopher Grant, agr...@chromium.org, Chromium-dev
Ah out-of-date catapult was indeed the issue - my catapult repo is manually synced. Thanks Andrew! 

On Mon, Aug 28, 2017 at 2:00 PM Christopher Grant <cjg...@chromium.org> wrote:
For the record, I also saw this failure (last week).
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABiQX1Ukhh4MhQhS-1J22HazHJdvNwJypKJKFQAV0XpRqXiu6g%40mail.gmail.com.

wang...@sina.com

unread,
Apr 13, 2018, 9:50:52 PM4/13/18
to Chromium-dev, dp...@google.com
This week I have fetched the latest chromium and checkout 55.0.2883.87 to build the old version on windows. However, the issue in this thread always happens. The src/build/android/play_services/update.py seems to be used for android. I am confused why is run on windows. The error log:  
$ gclient runhooks
Running hooks:   8% ( 4/47) sdkextras
________ running 'C:\Python27\python.exe src/build/android/play_services/update.py download' in 'E:\chromium2'
Traceback (most recent call last):
  File "src/build/android/play_services/update.py", line 21, in <module>
    import devil_chromium
  File "src/build/android/play_services\..\devil_chromium.py", line 15, in <module>
    from devil import devil_env
  File "E:\chromium2\src\third_party\catapult\devil\devil\devil_env.py", line 32, in <module>
    import dependency_manager  # pylint: disable=import-error
  File "E:\chromium2\src\third_party\catapult\dependency_manager\dependency_manager\__init__.py", line 29, in <module>
    from .archive_info import ArchiveInfo
  File "E:\chromium2\src\third_party\catapult\dependency_manager\dependency_manager\archive_info.py", line 9, in <module>
    from dependency_manager import exceptions
  File "E:\chromium2\src\third_party\catapult\dependency_manager\dependency_manager\exceptions.py", line 5, in <module>
    from py_utils import cloud_storage
  File "E:\chromium2\src\third_party\catapult\common\py_utils\py_utils\cloud_storage.py", line 21, in <module>
    from py_utils import lock
  File "E:\chromium2\src\third_party\catapult\common\py_utils\py_utils\lock.py", line 18, in <module>
    import win32con    # pylint: disable=import-error
ImportError: No module named win32con
Error: Command 'C:\\Python27\\python.exe src/build/android/play_services/update.py download' returned non-zero exit status 1 in E:\chromium2

My steps:
1. install vs2015 with  Windows 10 SDK (10.0.10586) 
2. Set environment variables:
    set GYP_DEFINES = branding = Chromium buildtype = Official
    set DEPOT_TOOLS_WIN_TOOLCHAIN = 0
    set GYP_MSVS_VERSION = 2015
3. fetch --nohooks --no-history chromium 
4. git fetch -t 
5. git checkout -b chromium55  55.0.2883.87
6. gclient.py runhooks  


I tried to remove sdkextras action in src/DEPS and run 'gclient runhooks' again. It seemly hung in gn_win.
$ gclient runhooks
Running hooks:  58% (27/46) gn_win


wang...@sina.com

unread,
Apr 15, 2018, 10:17:07 PM4/15/18
to Chromium-dev, dp...@google.com
I have found the reason which causes this issue on my PC. It is there are vs2013 and vs2015 installed. I tried to build the chrome 55 on my laptop (which does not have vs2013) as steps mentioned in my previous post. It goes well without any issues. But I don't know why vs2013 caused building chrome 55 failed. 

-Mark  

张晓峰

unread,
Dec 21, 2018, 10:19:41 PM12/21/18
to Chromium-dev
If you are also in corporate network, help this helpful.

I fix it by add environment variable:

 export BOTO_CONFIG=/path/to/boto.proxy

在 2017年8月29日星期二 UTC+8上午1:33:37,Deepanjan Roy写道:
Reply all
Reply to author
Forward
0 new messages