{"id":1347,"date":"2019-03-19T19:54:20","date_gmt":"2019-03-19T19:54:20","guid":{"rendered":"http:\/\/www.edwinmichielsen.nl\/?p=1347"},"modified":"2019-03-19T20:41:54","modified_gmt":"2019-03-19T20:41:54","slug":"flask-on-raspberry-pi-and-starting-the-flask-app-on-startup","status":"publish","type":"post","link":"https:\/\/edwinmichielsen.nl\/?p=1347","title":{"rendered":"Flask on Raspberry Pi and starting the flask app on startup"},"content":{"rendered":"<p>After creating a working flask app on my laptop, which uses the library Matplotlib, i moved the app to my raspberry.<\/p>\n<p>The app itself worked , but the matplotlib plot did not show, due to a parameter that was used : pad = none in plt.title. This did not give an issue on my laptop but it did on the pi. Removing this solved the issue.<\/p>\n<p>Another issue I needed to tackle was starting the app at reboot. My first option of using the script start in : crontab -e did not work. The app was not started. using this command: python3 \/var\/www\/warmte\/xxx.py &amp;<\/p>\n<p>Moving the line to rc.local did the job:<\/p>\n<ul>\n<li>sudo nano \/etc\/rc.local<\/li>\n<li>add the line: <em>python3 \/var\/www\/warmte\/xxx.py &amp;&nbsp;<\/em> before the exit 0<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>After creating a working flask app on my laptop, which uses the library Matplotlib, i moved the app to my raspberry. The app itself worked , but the matplotlib plot did not show, due to a parameter that was used : pad = none in plt.title. This did not give an issue on my laptop &hellip; <a href=\"https:\/\/edwinmichielsen.nl\/?p=1347\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Flask on Raspberry Pi and starting the flask app on startup&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[71,72,13],"tags":[],"class_list":["post-1347","post","type-post","status-publish","format-standard","hentry","category-programming","category-python","category-raspberry"],"_links":{"self":[{"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=\/wp\/v2\/posts\/1347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1347"}],"version-history":[{"count":1,"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=\/wp\/v2\/posts\/1347\/revisions"}],"predecessor-version":[{"id":1348,"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=\/wp\/v2\/posts\/1347\/revisions\/1348"}],"wp:attachment":[{"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edwinmichielsen.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}