Issue
I am trying to use DialogFlow to make a small talk chatbot on Raspberry Pi 4, and I am getting this error:
ImportError: /usr/local/lib/python3.7/dist-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: aes_hw_encrypt
My code is as follows:
"""
Libraries used:
dialogflow 1.1.0 - I did pip3 install dialogflow -U and it upgraded to this
google-api-core 1.29.0
os Latest version - not sure
"""
import os
import dialogflow
from google.api_core.exceptions import InvalidArgument
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = 'secrets.json'
DIALOGFLOW_PROJECT_ID = '[test_id]'
DIALOGFLOW_LANGUAGE_CODE= '[en]'
SESSION_ID = 'me'
text_to_be_analyzed = "Howdy"
session_client = dialogflow.SessionsClient()
session = session_client.session_path(DIALOGFLOW_PROJECT_ID, SESSION_ID)
text_input = dialogflow.types.TextInput(text=text_to_be_analyzed, language_code=DIALOGFLOW_LANGUAGE_CODE)
query_input = dialogflow.types.QueryInput(text=text_input)
try:
response = session_client.detect_intent(session=session, query_input=query_input)
except InvalidArgument:
raise
print("Query text:", response.query_result.query_text)
print("Detected intent:", response.query_result.intent.display_name)
print("Detected intent confidence:", response.query_result.intent_detection_confidence)
print("Fulfillment text:", response.query_result.fulfillment_text)
pip3 list
gives me:
-------------------------------- ---------------
Adafruit-BBIO 1.2.0
Adafruit-Blinka 6.10.0
Adafruit-CharLCD 1.1.1
adafruit-circuitpython-busdevice 5.0.6
adafruit-circuitpython-framebuf 1.4.7
adafruit-circuitpython-ssd1306 2.11.4
Adafruit-GPIO 1.0.3
Adafruit-ILI9341 1.5.1
Adafruit-PlatformDetect 3.13.3
Adafruit-PureIO 1.1.8
Adafruit-SSD1306 1.6.2
appdirs 1.4.3
asn1crypto 0.24.0
astroid 2.1.0
asttokens 1.1.13
attrs 21.2.0
automationhat 0.2.0
beautifulsoup4 4.7.1
blinker 1.4
blinkt 0.1.2
bs4 0.0.1
buttonshim 0.0.2
cachetools 4.2.2
Cap1xxx 0.1.3
certifi 2018.8.24
chardet 3.0.4
Click 7.0
colorama 0.3.7
colorzero 1.1
cookies 2.2.1
cryptography 2.6.1
cupshelpers 1.0
cycler 0.10.0
decorator 4.4.2
dialogflow 1.1.0
docutils 0.14
drumhat 0.1.0
entrypoints 0.3
envirophat 1.0.0
ExplorerHAT 0.4.2
flake8 3.9.2
Flask 1.0.2
fourletterphat 0.1.0
fuzzywuzzy 0.18.0
google-api-core 1.29.0
google-auth 1.30.1
googleapis-common-protos 1.53.0
gpiozero 1.5.1
grpcio 1.38.0
guizero 0.6.0
html5lib 1.0.1
idna 2.6
imageio 2.9.0
importlib-metadata 4.0.1
iniconfig 1.1.1
ipykernel 4.9.0
ipython 5.8.0
ipython-genutils 0.2.0
isort 4.3.4
itsdangerous 0.24
jaraco.context 4.0.0
jedi 0.13.2
Jinja2 2.10
jupyter-client 5.2.3
jupyter-core 4.4.0
keyring 17.1.1
keyrings.alt 3.1.1
kiwisolver 1.3.1
lazy-object-proxy 1.3.1
logilab-common 1.4.2
lxml 4.3.2
MarkupSafe 1.1.0
matplotlib 3.4.2
mccabe 0.6.1
microdotphat 0.2.1
mongo-db 0.1
more-itertools 8.8.0
mote 0.0.4
motephat 0.0.3
mypy 0.670
mypy-extensions 0.4.1
networkx 2.5.1
nightly 0.0.1
nudatus 0.0.4
numpy 1.20.3
oauthlib 2.1.0
olefile 0.46
packaging 20.9
pandas 1.2.4
pantilthat 0.0.7
parso 0.3.1
pexpect 4.6.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
pickleshare 0.7.5
piglow 1.2.5
pigpio 1.78
Pillow 8.2.0
pip 18.1
pluggy 0.13.1
prompt-toolkit 3.0.18
protobuf 3.17.2
psutil 5.5.1
py 1.10.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycairo 1.16.2
pycodestyle 2.7.0
pycrypto 2.6.1
pycups 1.9.73
pyflakes 2.3.1
pyftdi 0.53.1
pygame 1.9.4.post1
Pygments 2.3.1
PyGObject 3.30.4
pyinotify 0.9.6
PyJWT 1.7.0
pylint 2.2.2
pymongo 3.4.0
pyOpenSSL 19.0.0
pyparsing 2.4.7
pyserial 3.4
pysmbc 1.0.15.6
pytest 6.2.4
python-apt 1.8.4.3
python-dateutil 2.8.1
python-espeak 0.5
python-Levenshtein 0.12.2
pytz 2021.1
pyusb 1.1.1
PyWavelets 1.1.1
pyxdg 0.25
PyYAML 5.4.1
pyzmq 17.1.2
qtconsole 4.3.1
rainbowhat 0.1.0
reportlab 3.5.13
requests 2.21.0
requests-oauthlib 1.0.0
responses 0.9.0
roman 2.0.0
rpi-ws281x 4.2.6
RPi.GPIO 0.7.0
rsa 4.7.2
RTIMULib 7.2.1
scikit-image 0.18.1
scipy 1.6.3
screen 1.0.1
scrollphat 0.0.7
scrollphathd 1.2.1
SecretStorage 2.3.1
semver 2.0.1
Send2Trash 1.5.0
sense-hat 2.2.0
setuptools 40.8.0
simplegeneric 0.8.1
simplejson 3.16.0
six 1.16.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 1.8
sox 1.4.1
spidev 3.4
ssh-import-id 5.7
sysv-ipc 1.1.0
thonny 3.3.6
tifffile 2021.4.8
toml 0.10.2
torch 1.0.0a0+8322165
torchvision 0.2.0
tornado 5.1.1
touchphat 0.0.1
traitlets 4.3.2
twython 3.7.0
typed-ast 1.3.1
typing 3.7.4.3
typing-extensions 3.10.0.0
uflash 1.2.4
unicornhathd 0.0.4
urllib3 1.24.1
wcwidth 0.2.5
webencodings 0.5.1
Werkzeug 0.14.1
wheel 0.32.3
wit 6.0.0
wolframalpha 5.0.0
wrapt 1.10.11
xmltodict 0.12.0
zipp 3.4.1
I might have accidentally installed the libraries some other way when I updated, but I don't think so...
I didn't install anything using apt
.
I am using Thonny Python. Thanks!
Solution
cryptography
lib was old. Thanks to everyone who helped!
Answered By - g3holliday