ozgur / python-firebase

Python interface to the Firebase's REST API
http://ozgur.github.com/python-firebase/
MIT License
593 stars 155 forks source link

SyntaxError: invalid syntax #102

Open mjangid opened 5 years ago

mjangid commented 5 years ago

I have just included the library and got this error

(base) bash-3.2$ python firebase_app.py Traceback (most recent call last): File "firebase_app.py", line 2, in from firebase import firebase File "/Users/manoj/anaconda3/lib/python3.7/site-packages/firebase/init.py", line 3 from .async import process_pool ^ SyntaxError: invalid syntax

here is the source:


from firebase import firebase
import requests
import json

def get_firebase_data():
    firebase = firebase.FirebaseApplication('https://my_storage.firebaseio.com', None)
    result = firebase.get('/words', None)
    print(result)
khaledallen commented 4 years ago

I just got the same error immediately upon including the library and running almost the same code as @mjangid .

harshajayaweeraXHJ commented 4 years ago

Any update on this. It seems critical issue as it doesn't support Python 3.7

athasamid commented 4 years ago

Anu update on this? I just got some issue

tomlockwood commented 4 years ago

I think this issue was fixed on this commit: https://github.com/ozgur/python-firebase/commit/9fccf87303a27a6b7d871b0bae8336bb6070ff5b

And it hasn't propagated into pip packages yet. I solved the issue by cloning the repo and manually moving the python module code into my .virtualenv/lib/python3.8/site-packages/firebase folder. This may work for some of you?

umangraval commented 4 years ago

check this out https://stackoverflow.com/a/53435648/11840409

cs5001spr20 commented 4 years ago

Dear Ozgur,

When can we expect the public versions of this to be updated in pip for 3.7 and higher?

As a result of the bug, we have ~19 grad students and a few TAs who won't be using firebase as originally planned.

It isn't realistic for the teaching staff to be helping a couple dozen students debug various versions of 3rd party code as part of their homework assignments, and editing 3rd party libraries isn't a practice we want to encourage or condone.

Thanks, Mark

b4oshany commented 4 years ago

Hi @cs5001spr20, I'll work on updating the pip version of the project to support python 3.7 and higher. Hopefully, there are pull requests for Python 3.7 compatibility. Once we all the tests have passed, I will push it to PyPi. Both Ozgur and I are maintainers of the project, but we've been dormant due to work.

cs5001spr20 commented 4 years ago

Dear Oshane,

That is great to hear! Although the class ends in about 2 weeks, this will be useful in the future and the students may still benefit from working with it in a Lab if it gets solved soon.

Regards, Mark

On Apr 5, 2020, at 6:53 AM, Oshane Bailey notifications@github.com wrote:

Hi @cs5001spr20 https://github.com/cs5001spr20, I'll work on updating the pip version of the project to support python 3.7 and higher. Hopefully, there are pull requests for Python 3.7 compatibility. Once we all the tests have passed, I will push it to PyPi. Both Ozgur and I are maintainers of the project, but we've been dormant due to work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ozgur/python-firebase/issues/102#issuecomment-609420249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPLPWB7FHAVRK7LL6XX4WLRLCEOZANCNFSM4I4X5A7A.

Mark L. Miller, Ph.D. Executive Director Learningtech.org http://learningtech.org/ San Carlos, CA 94070 mlmiller@learningtech.org mailto:mlmiller@learningtech.org mark.miller@northeastern.edu mailto:mark.miller@northeastern.edu 650-598-0105 x203 (Please dial 203, not 0perator, for fastest response!)

Antimality commented 4 years ago

@tomlockwood Your solution worked, thank you. Additionally, @b4oshany is there any progress on updating the pip version? According to https://pypi.org/project/python-firebase/#history it wasn't updated since 2014!

JVillella commented 4 years ago

Just add,

...
git+https://github.com/ozgur/python-firebase

to your requirements.txt for now.