Closed hamad-9 closed 2 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Raspberry Pi is not an official platform we support. However, I came across this doing a quick search on your error. There are a couple fixes mentioned in that thread.
In the future, please use Stack Overflow to ask usage questions. Thanks!
I'm trying to connect the raspberry pi to the firestore I downloaded the package using the following command sudo pip install firebase-admin this is my code
and when I run the file the following error occurs
/usr/bin/python /home/pi/Desktop/moneybank/database.py Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/firebase_admin/firestore.py", line 22, in
from google.cloud import firestore # pylint: disable=import-error,no-name-in-module
File "/home/pi/.local/lib/python3.9/site-packages/google/cloud/firestore.py", line 18, in
from google.cloud.firestore_v1 import version
File "/home/pi/.local/lib/python3.9/site-packages/google/cloud/firestore_v1/init.py", line 30, in
from google.cloud.firestore_v1._helpers import GeoPoint
File "/home/pi/.local/lib/python3.9/site-packages/google/cloud/firestore_v1/_helpers.py", line 22, in
from google.api_core import gapic_v1 # type: ignore
File "/home/pi/.local/lib/python3.9/site-packages/google/api_core/gapic_v1/init.py", line 16, in
from google.api_core.gapic_v1 import config
File "/home/pi/.local/lib/python3.9/site-packages/google/api_core/gapic_v1/config.py", line 23, in
import grpc
File "/usr/local/lib/python3.9/dist-packages/grpc/init.py", line 22, in
from grpc import _compression
File "/usr/local/lib/python3.9/dist-packages/grpc/_compression.py", line 15, in
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
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/pi/Desktop/moneybank/database.py", line 5, in
from firebase_admin import firestore
File "/usr/local/lib/python3.9/dist-packages/firebase_admin/firestore.py", line 28, in
raise ImportError('Failed to import the Cloud Firestore library for Python. Make sure '
ImportError: Failed to import the Cloud Firestore library for Python. Make sure to install the "google-cloud-firestore" module.
note that: the same file is working on my laptop and this is the expected output {'ils': 470, 'jod': 20, 'usd': 0}