I don't know how to Summarize or Format the problem, I am providing the error
Traceback (most recent call last): File "push.py", line 1, in from pyrebase import pyrebase File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyrebase__init__.py", line 1, in from .pyrebase import initialize_app File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyrebase\pyrebase.py", line 17, in from oauth2client.service_account import ServiceAccountCredentials File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauth2client\service_account.py", line 25, in from oauth2client import client File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauth2client\client.py", line 45, in from oauth2client import crypt File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauth2client\crypt.py", line 55, in from oauth2client import _pycrypto_crypt File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\oauth2client_pycrypto_crypt.py", line 17, in from Crypto.PublicKey import RSA File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pycrypto-2.6.1-py3.7-win32.egg\Crypto\PublicKey\RSA.py", line 75, in from Crypto.Util.number import getRandomRange, bytes_to_long, long_to_bytes File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pycrypto-2.6.1-py3.7-win32.egg\Crypto\Util\number.py", line 139 value = 2L ** (N-1) # Ensure high bit is set ^ SyntaxError: invalid syntax
I had errors installing Pyrebase so I am currently using Pyrebase4 I also tried installing PyCryptoDome and then installing Pyrebase manually after configuring to avoid versioning error This is my code:
import pyrebase
config={keys and all go here}
firebase=pyrebase.initialize_app(config)
db=firebase.database()
db.child("names").push({"name":"Abhinav"})
Expected to push data to Firebase
if you have installed pyrebase (v3) and is not working just do
pip3 install pyrebase4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With