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

Might be another issue of supporting Python 3 #179

Closed
fbukevin opened this issue Oct 13, 2016 · 2 comments
Closed

Might be another issue of supporting Python 3 #179

fbukevin opened this issue Oct 13, 2016 · 2 comments

Comments

@fbukevin
Copy link

I just import apns and get the error:

Python 3.5.0 (default, Sep 23 2015, 04:41:38) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import apns
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 896, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1136, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1112, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1093, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 530, in spec_from_file_location
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/apns-2.0.1-py3.5.egg/apns.py", line 218
    except ssl.SSLError, err:
                       ^
SyntaxError: invalid syntax

Also, when I used sample code in README i got the same error:

Traceback (most recent call last):
  File "test_apns.py", line 6, in <module>
    from apns import APNs, Frame, Payload
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 896, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1136, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1112, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1093, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 530, in spec_from_file_location
  File "/Users/veck/Desktop/.../venv/lib/python3.5/site-packages/apns-2.0.1-py3.5.egg/apns.py", line 218
    except ssl.SSLError, err:
                       ^
SyntaxError: invalid syntax
@fbukevin
Copy link
Author

I found this commit had fixed this problem. But I don't have idea why it seems that it was removed from current code?

@ExplodingCabbage
Copy link
Collaborator

It hasn't been removed; there's just never been a release on PyPi that contained that commit. Closing as a duplicate of #163; we need @djacobs to make another release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants