ozgur/python-firebase

SystaxError: invalid syntax

elcolie opened this issue · 13 comments

OSX 10.13.5
Python3.7

In [2]: from firebase import firebase
Traceback (most recent call last):

  File "/Users/sarit/.pyenv/versions/3.7.0/envs/bangna/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-2-13b1d3dca18c>", line 1, in <module>
    from firebase import firebase

  File "/Users/sarit/.pyenv/versions/3.7.0/envs/bangna/lib/python3.7/site-packages/firebase/__init__.py", line 3
    from .async import process_pool
              ^
SyntaxError: invalid syntax

I'm facing the same error, have you solved it?

I'm using python 3.7 in OSX 10.10

@jaypatel-searce Go back to 3.6 because async is a reserved word in 3.7.

I'm supposed to deploy this code on GCP standard environment, which only supports 2.7 or 3.7.
However If I go back to 3.6 in my local machine, but how to deal with GCP.

Assume GCP is an ordinary VM. You can use pyenv, docker, ... etc to create an virtual environment.

Facing the same issue. I am trying to use this in google cloud function. It has only python 3.7
Dont know what to do. Please advice

This was fixed in 9fccf87 but looks like it hasn't yet made it into a new pypi release.

Still facing the same issue.

second

I'm facing the same problem python 3.8

lol. I 'fix' this 'issue' that is long than an year.

  1. you should rename file async.py ( i choose async_fb.py)
  2. then in 'init.py' file replace line 3 with: from .async_fb import process_pool
  3. then in 'firebase.py' file replace line 12 with: from .async_fb import process_pool
    this is embarrassing...
    Enjoy codding!

lol. I 'fix' this 'issue' that is long than an year.

  1. you should rename file async.py ( i choose async_fb.py)
  2. then in 'init.py' file replace line 3 with: from .async_fb import process_pool
  3. then in 'firebase.py' file replace line 12 with: from .async_fb import process_pool
    this is embarrassing...
    Enjoy codding!

Thnak you, that worked!

I has been merged in the master already. Thank you for heads-up

3. .async_fb

It shows this error now:
from .async_fb import process_pool
ImportError: attempted relative import with no known parent package