I had the same issue running the sample, I found a bug in the python onionGpio.py library
In the _setDirection function I moved :
# set default for output direction
if direction == _GPIO_OUTPUT_DIRECTION:
so that it followed the :
status = self._freeGpio()
because the setValue call has a __initGpio call in it's code which was being called before the resource had been freed.