Receiving .async error when trying to import the firebase package

前端 未结 4 594
猫巷女王i
猫巷女王i 2021-01-11 09:46

I\'m trying to write a python script that requires a connection to firebase. I\'ve installed the python-firebase package, but when I import it into my program using \'

相关标签:
4条回答
  • 2021-01-11 10:12

    I commented "#from .async import process_pool" in firebase.py and started working, it was incompatible with python 3.7

    0 讨论(0)
  • 2021-01-11 10:17

    The issue was fixed here here. For some reason, the working python-firebase package did not make it to PyPI.

    In order to fix it, pip install the latest version manually:

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

    If you need a static version of the library, you could use the commit hash. For example:

    pip install \
        git+https://github.com/ozgur/python-firebase@0d79d7609844569ea1cec4ac71cb9038e834c355
    
    0 讨论(0)
  • 2021-01-11 10:21

    ya because your action is wrong its a system-generated file don't comment it just follows steps

    1)rename .async into .async_

    2)open__init__ file and change .async into .async_

    3)open firebase.py and change .async into .async_

    because of .async is the keyword now is current version in python

    Done>>>>>>>>>>

    0 讨论(0)
  • 2021-01-11 10:25

    The problem is that async is a keyword in python 3.7 the solution is quite simple.

    Just rename the file async.py to something other like asyncn.py and replace every from .async import process_pool in the files firebase.py , decorators.py and others , to from .asyncn import process_pool

    Edit:

    Also it might still persist so change it from init.py file

    0 讨论(0)
提交回复
热议问题