I get an internal server error when I import the gpio pins library in my simple
__init__.py file. And the debugger doesn't show up.
As I understand it, the server doesn't have the permission to access the gpio pins. How do I give it permission?
If you are trying to access the GPIO pins and trigger the pins from a web UI (http request). I would suggest you to keep a utility directory (lib) in your flask project and write your triggers/actions for GPIO pins there.
Keep it away from your flask application.Based on your request (ReST API request) have this utility module imported on the corresponding file and then introduce your trigger to the pin.
Let me know if this helps.