when Mailgun was used :>> “python3 temp_email.py” is giving the following error
Traceback (most recent call last):
File “temp_email.py”, line 2, in
from boltiot import Email, Bolt
File “/usr/local/lib/python3.6/dist-packages/boltiot/init.py”, line 2, in
from boltiot.alert import Sms
File “/usr/local/lib/python3.6/dist-packages/boltiot/alert.py”, line 1, in
from twilio.rest import Client
File “/root/twilio.py”, line 2, in
from twilio.rest import Client
bro your using twillio instead of mailgun check once
iam giving my code with execution
@gangwaranant Do you have another file with the name of boltiot.py in the same folder as your code? If yes, then please rename it to something else.
Thanks for replying.
But i’ve checked, my program is same as yours.
but its still giving the error
There’re no duplicate files. see
root@ubuntu-s-1vcpu-1gb-nyc1-01:~# ls
pycache php-7.4.2.tar.gz
anomaly_detection telegram_bot_id
conf.py temp_email.py
device_control.py temp_sms.py
device_status.py twilio-twilio-python-18bf374
email_conf.py twilio-twilio-python-6.35.3-0-g18bf374.zip
first.py twilio.py
iot twilio.pyc
bro rewrite the code and conf file with different names it will defenetly works try once
Hi @gangwaranant,
If you created a file with the name twilio.py. You can not name a file similar to the python libraries.
Copy the code of twilio.py file into other file and then remove the twilio.py file by typing the below command.
sudo cp twilio.py my_sms.py
sudo rm twilio.py
and then run your python code
sudo python3 my_sms.py