I made a script that sends data to Firestore. On my Mac the script works, but when I try to run it on my Raspberry pi I get this error message. I tried to reinstall google-cloud-firestore but it does't work.
Can anybody help me.
The code:
import os
import firebase_admin
from firebase_admin import credentials
from google.cloud import firestore
from firebase_admin import firestore
cred = credentials.Certificate("serviceAccountKey.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
def sendDataToFirestore(username, shifts, upload):
scedule = {}
for shift in shifts:
date = shift.split()[0]
scedule[date] = shift
if (upload == True):
try:
print("Send data to database...")
db.collection("Users").document(username).set({'Last update': firestore.SERVER_TIMESTAMP, 'Scedule': scedule})
print("Succes!")
except Exception as e:
print(e)
else:
print("Data is NOT send to the database")
Error message (Raspberry pi):
pi@raspberrypi:~ $ sudo python3 /home/pi/Documents/PlanningServer/Scrapper.py
Traceback (most recent call last):
File "/home/pi/Documents/PlanningServer/Scrapper.py", line 8, in <module>
from FirestoreDatabase import sendDataToFirestore
File "/home/pi/Documents/PlanningServer/FirestoreDatabase.py", line 10, in <module>
from google.cloud import firestore
File "/usr/local/lib/python3.9/dist-packages/google/cloud/firestore.py", line 18, in <module>
from google.cloud.firestore_v1 import __version__
File "/usr/local/lib/python3.9/dist-packages/google/cloud/firestore_v1/__init__.py", line 30, in <module>
from google.cloud.firestore_v1._helpers import GeoPoint
File "/usr/local/lib/python3.9/dist-packages/google/cloud/firestore_v1/_helpers.py", line 22, in <module>
from google.api_core import gapic_v1 # type: ignore
File "/usr/local/lib/python3.9/dist-packages/google/api_core/gapic_v1/__init__.py", line 16, in <module>
from google.api_core.gapic_v1 import config
File "/usr/local/lib/python3.9/dist-packages/google/api_core/gapic_v1/config.py", line 23, in <module>
import grpc
File "/usr/local/lib/python3.9/dist-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/usr/local/lib/python3.9/dist-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: /usr/local/lib/python3.9/dist-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so: undefined symbol: __atomic_exchange_8