Error in Code Temperature sensor

        During handling of the above exception, another exception occurred:
        Traceback (most recent call last):
          File "temp_sms.py", line 9, in <module>
        response=mybolt.analogRead('A0')
          File "/usr/local/lib/python3.5/dist-packages/boltiot/bolt.py", line 76, in analogRead
        return request_from(url('analogRead'), self.api_key, pin, self.device_id)
          File "/usr/local/lib/python3.5/dist-packages/boltiot/requesting.py", line 16, in request_from
        except err:
        UnboundLocalError: local variable 'err' referenced before assignment

Hi, I am getting this error on executing temperature sensor code. I am not recieving message from twilio on my verified phone number. please check.

Did you create a conf.py file?
If you did, attach a screenshot of your temp_sms.py file.

Please delete this immediately and change your API keys. Attach the code in temp_sms.py file as I asked.

It should be
except Exception as e:

1 Like

Hi @kamramohit96,

There is the issue in the last block of exception in boltiot library. https://github.com/Inventrom/bolt-api-python/blob/master/boltiot/requesting.py#L16

It will be fixed by the next week. It should be only

except:
        return {"success":"0", "message":"Something went wrong"}