dreipol / django-scarface

Send push notifications to mobile devices using Amazon SNS
MIT License
43 stars 21 forks source link

SyntaxError: invalid syntax #9

Closed alexgv14 closed 8 years ago

alexgv14 commented 8 years ago

Getting the following syntax error on install and when trying to run migrations:

File "/usr/local/lib/python2.7/dist-packages/scarface/platform_strategy.py", line 38 class PlatformStrategy(metaclass=ABCMeta): ^ SyntaxError: invalid syntax

melbic commented 8 years ago

Could you please submit some context? What kind of PlatformStrategy do you use? What django version do you use?

We actually just pushed a new version which fixes a PlatformStrategy problem, but probably not yours.

alexgv14 commented 8 years ago

I am using Django (1, 9, 5, 'final', 0) and python 2.7

SOmeone else had a similar issue to me. http://stackoverflow.com/questions/36100771/django-scarface-not-working-in-python-2-7

alexgv14 commented 8 years ago

@melbic I'll keep an eye out for when you fix this would love to use your library.

alexgv14 commented 8 years ago

@melbic any plans to fix this within the next 2 weeks or should I plan on making my own. Just curious not trying to make you do it or anything like that.

melbic commented 8 years ago

Hey @alexgv14 I haven't had the time to look into it and because we're only using python 3.4+ this issue isn't a top priority. I think it would be great if you could create a pull request. I'd be happy to merge it. If you have any questions while working on it, feel free to ask me. Thanks!

neosergio commented 8 years ago

I created a pull request for that issue, please review it: https://github.com/dreipol/django-scarface/pull/11

philipplaeubli commented 8 years ago

django-scarface 3.0a7 is on pypi. @alexgv14 & @neosergio can you confirm that the changes solve your issue?

alexgv14 commented 8 years ago

@philipplaeubli I have installed the latest package and followed the instructions. It is in the installed apps conf. However, I get the following error when trying to import.

screen shot 2016-06-02 at 10 23 23 am

philipplaeubli commented 8 years ago

Have you made sure that you follow the latest version of the manual: http://django-scarface.readthedocs.io/en/latest/ ?

alexgv14 commented 8 years ago

That helps @philipplaeubli . But I think I found another bug. Is there a way to change the region?

{"Error":{"Code":"InvalidParameter","Message":"Invalid parameter: PlatformApplicationArn Reason: Region from ARN (us-east-1) is different than SNS endpoint region (eu-west-1).","Type":"Sender"},"RequestId":"11111-7e5e11115861-9bf8-11111111"}

philipplaeubli commented 8 years ago

Oh dear... Ok, I've released a ned alpha:django-scarface 3.0a8 Now you can change the AWS Region in your settings with the SCARFACE_REGION_NAME (see http://django-scarface.readthedocs.io/en/latest/)

alexgv14 commented 8 years ago

cool it works I noticed some other weird functionality should I report them or keep it to myself.

philipplaeubli commented 8 years ago

ok. please create new issues for those. otherwise this issue will get even more bloated 😉

thanks very much!

philipplaeubli commented 8 years ago

I'm closing this as the issue seems to be fixed.