I get the following warning: Warning Python says to add this command GPIO.setwarnings(False). Where do I put this command, in the file or in some system file?


Add this command before the first call to GPIO.setup() in your .py file, as it suppresses warnings in that call.


In any script of python if you are using GPIOs than, at the end means after using it you need to enter the line of GPIO.cleanup(). It will be useful for that warnings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.