Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'attribute': 0.07; 'urllib2': 0.07; 'ex:': 0.09; 'url:github': 0.09; 'python': 0.11; 'subject:import': 0.16; 'url:py': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'import': 0.22; 'aug': 0.22; 'exists': 0.24; 'source': 0.25; 'skip:" 40': 0.26; 'second': 0.26; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; '"",': 0.31; '8:30': 0.31; 'file': 0.32; '(most': 0.33; 'skip:_ 10': 0.34; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'clear': 0.37; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'subject:can': 0.39; 'to:addr:python.org': 0.39; 'frank': 0.68; 'url:master': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=+3WPPkZHPFt4PzyhdKe9BXG8RKVGQvqlSu+PJwqlk1U=; b=JASYaDBxEjX3d7niDoUb2eRD1dt6U3VtETm2maJ+Mly7+RSkcNx+JzKfSW5Fc1KdTy wkSOqQ6aqpit7BTLXd8bJEk0DOyRKuwX+c5wv15BhX1Wo1co8Ne85RUzwtv0MYDUhxmK PzY+4ogNb6svJdQsdcuhbr1y2nQTYSeuOV3qXWCAmTjaZSwZcqAQ6ph/o+rLGEqSsAOe acxtoKksd+WqYngkDb745YmIDFXsBdOUr5VgK6P7mdbjlt3cNnFYGNXbPzt551C/QIkD UIqvBAzNdMiMhoET4EPwP7KUaiVLVwCcoLMaZRh/CuFXTfdjE8oAOyjIHgh61v0WgOgu gi5w== X-Received: by 10.68.238.69 with SMTP id vi5mr11537948pbc.0.1409285337959; Thu, 28 Aug 2014 21:08:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Thu, 28 Aug 2014 22:08:17 -0600 Subject: Re: python 3.4 use python-gcm can't import To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409285341 news.xs4all.nl 2907 [2001:888:2000:d::a6]:51877 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77254 On Thu, Aug 28, 2014 at 8:30 PM, Frank Liou wrote: > i just > > from gcm import GCM > > then.... > > > Traceback (most recent call last): > File "C:/Users/frank/Desktop/SinyiAPI/SinyiAPI.py", line 7, in > from Model.Order import Order > File "C:\Users\frank\Desktop\SinyiAPI\Model\Order.py", line 7, in > from gcm.gcm import GCM > File "", line 2237, in _find_and_load > File "", line 2226, in _find_and_load_unlocked > File "", line 1191, in _load_unlocked > File "", line 1161, in _load_backward_compatible > File "C:\Users\frank\untitled1\lib\site-packages\python_gcm-0.1.5-py3.4-win32.egg\gcm\__init__.py", line 4, in > AttributeError: 'module' object has no attribute 'GCM' > it's don't let me import > i try so many way ex: > import gcm > from gcm.gcm import GCM > but still can't In the source at https://github.com/geeknam/python-gcm/blob/master/gcm/gcm.py I see that the second line is: import urllib2 Since urllib2 no longer exists in Python 3, that's a clear sign that this package supports Python 2 only.