Closed nio101 closed 7 years ago
So, it looks like your script isn't unexporting CSID2, so when you start it again, it's throwing the error.
What does your full script look like? I think you might not be cleaning up the GPIO properly.
There is a way to deal with this, the Utilities module. You can do the following at the beginning of your script:
import CHIP_IO.Utilities as UT
UT.unexport_all()
The above will work, but it doesn't solve the error of the GPIO not being cleaned up.
Thank you, I will try this, and also handle correctly the signal supervisord is sending to my script to gracefully shut it down... :)
@nio101, you still have issues with cleanup? My latest commits here fix it for good now (hopefully). Just seeing if there is an issue still, otherwise I'll close this.
No, it's fine for me, you can close it, thank you!
Hello,
Once a python script using CHIP_IO has exited, when I try to run it again, even with using
GPIO.cleanup()
before setting up the IO, I'm getting an error:Is there any workaround to be able to run my script again, without rebooting? Thanks.