Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77254

Re: python 3.4 use python-gcm can't import

References <c6179d50-e8c4-43d4-896f-77d234e0f9ff@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2014-08-28 22:08 -0600
Subject Re: python 3.4 use python-gcm can't import
Newsgroups comp.lang.python
Message-ID <mailman.13596.1409285341.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Aug 28, 2014 at 8:30 PM, Frank Liou <fk26541598fk@gmail.com> wrote:
> i just
>
> from gcm import GCM
>
> then....
>
>
> Traceback (most recent call last):
> File "C:/Users/frank/Desktop/SinyiAPI/SinyiAPI.py", line 7, in <module>
> from Model.Order import Order
> File "C:\Users\frank\Desktop\SinyiAPI\Model\Order.py", line 7, in <module>
> from gcm.gcm import GCM
> File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
> File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
> File "<frozen importlib._bootstrap>", 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 <module>
> 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python 3.4 use python-gcm   can't import Frank Liou <fk26541598fk@gmail.com> - 2014-08-28 19:30 -0700
  Re: python 3.4 use python-gcm can't import Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-28 22:08 -0600
    Re: python 3.4 use python-gcm can't import Frank Liou <fk26541598fk@gmail.com> - 2014-08-29 01:35 -0700
      Re: python 3.4 use python-gcm can't import Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-29 17:51 +0100

csiph-web