{"action":"created","issue":{"url":"https://api.github.com/repos/voxpupuli/puppetboard/issues/371","repository_url":"https://api.github.com/repos/voxpupuli/puppetboard","labels_url":"https://api.github.com/repos/voxpupuli/puppetboard/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/voxpupuli/puppetboard/issues/371/comments","events_url":"https://api.github.com/repos/voxpupuli/puppetboard/issues/371/events","html_url":"https://github.com/voxpupuli/puppetboard/issues/371","id":215002880,"number":371,"title":"centos 6 WSGI script 'wsgi.py' cannot be loaded as Python module","user":{"login":"mmgit1","id":17389942,"avatar_url":"https://avatars2.githubusercontent.com/u/17389942?v=3","gravatar_id":"","url":"https://api.github.com/users/mmgit1","html_url":"https://github.com/mmgit1","followers_url":"https://api.github.com/users/mmgit1/followers","following_url":"https://api.github.com/users/mmgit1/following{/other_user}","gists_url":"https://api.github.com/users/mmgit1/gists{/gist_id}","starred_url":"https://api.github.com/users/mmgit1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmgit1/subscriptions","organizations_url":"https://api.github.com/users/mmgit1/orgs","repos_url":"https://api.github.com/users/mmgit1/repos","events_url":"https://api.github.com/users/mmgit1/events{/privacy}","received_events_url":"https://api.github.com/users/mmgit1/received_events","type":"User","site_admin":false},"labels":[{"id":49847745,"url":"https://api.github.com/repos/voxpupuli/puppetboard/labels/bug","name":"bug","color":"0e8a16","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-03-17T13:27:25Z","updated_at":"2017-03-23T23:00:24Z","closed_at":null,"body":"Hello,\r\n\r\nI've very intersted in using the puppetboard app.  I'm running puppetdb 4.3.  Below is what I'm running on for server/python/httpd/mod_wsgi versions.\r\n\r\nCentOS 6.8\r\npython 2.6.6\r\nhttpd-2.2.15-56.el6.centos.3.x86_64\r\nhttpd-devel-2.2.15-56.el6.centos.3.x86_64\r\nmod_wsgi-3.2-7.el6.x86_64\r\n\r\nWhen I try to hit http://localhost for puppetboard I get internal server error and a bunch of errors in the log.  See below for the details for settings and log files.  Puppetboard is installed on the same server as puppetdb.  Any help would be appreciated.\r\n\r\nThanks,\r\nMike\r\n\r\n\r\nI ran pip install puppetboard\r\n\r\nLocation of puppetboard pip install: \r\n/usr/lib/python2.6/site-packages/puppetboard/\r\n\r\nThe /var/www/html/puppetboard/settings.py has this below.\r\n\r\nimport os\r\n\r\nPUPPETDB_HOST = '192.168.2.230'\r\nPUPPETDB_PORT = 8080\r\nPUPPETDB_SSL_VERIFY = True\r\nPUPPETDB_KEY = '/etc/puppetlabs/puppetdb/ssl/private.pem'\r\nPUPPETDB_CERT = '/etc/puppetlabs/puppetdb/ssl/public.pem'\r\nPUPPETDB_TIMEOUT = 20\r\nDEFAULT_ENVIRONMENT = 'production'\r\nSECRET_KEY = os.urandom(24)\r\nDEV_LISTEN_HOST = '127.0.0.1'\r\nDEV_LISTEN_PORT = 5000\r\nDEV_COFFEE_LOCATION = 'coffee'\r\nUNRESPONSIVE_HOURS = 2\r\nENABLE_QUERY = True\r\nLOCALISE_TIMESTAMP = True\r\nLOGLEVEL = 'info'\r\nNORMAL_TABLE_COUNT = 100\r\nLITTLE_TABLE_COUNT = 10\r\nTABLE_COUNT_SELECTOR = [10, 20, 50, 100, 500]\r\nOFFLINE_MODE = False\r\nENABLE_CATALOG = False\r\nOVERVIEW_FILTER = None\r\nGRAPH_TYPE = 'pie'\r\nGRAPH_FACTS = ['architecture',\r\n               'clientversion',\r\n               'domain',\r\n               'lsbcodename',\r\n               'lsbdistcodename',\r\n               'lsbdistid',\r\n               'lsbdistrelease',\r\n               'lsbmajdistrelease',\r\n               'netmask',\r\n               'osfamily',\r\n               'puppetversion',\r\n               'processorcount']\r\nINVENTORY_FACTS = [('Hostname', 'fqdn'),\r\n                   ('IP Address', 'ipaddress'),\r\n                   ('OS', 'lsbdistdescription'),\r\n                   ('Architecture', 'hardwaremodel'),\r\n                   ('Kernel Version', 'kernelrelease'),\r\n                   ('Puppet Version', 'puppetversion'), ]\r\nREFRESH_RATE = 30\r\nDAILY_REPORTS_CHART_ENABLED = True\r\nDAILY_REPORTS_CHART_DAYS = 8\r\n\r\n\r\n\r\nThe /var/www/html/puppetboard/wsgi.py file has this below.\r\n\r\nfrom __future__ import absolute_import\r\nimport os\r\n\r\n# Needed if a settings.py file exists\r\nos.environ['PUPPETBOARD_SETTINGS'] = '/var/www/html/puppetboard/settings.py'\r\nfrom puppetboard.app import app as application\r\n\r\nThe /etc/httpd/conf/httpd.conf has this in it\r\n\r\n<VirtualHost *:80>\r\n    ServerName localhost\r\n    WSGIDaemonProcess puppetboard user=apache group=apache threads=5\r\n    WSGIScriptAlias / /var/www/html/puppetboard/wsgi.py\r\n    ErrorLog logs/puppetboard-error_log\r\n    CustomLog logs/puppetboard-access_log combined\r\n\r\n    Alias /static /usr/lib/python2.6/site-packages/puppetboard/static\r\n    <Directory /usr/lib/python2.6/site-packages/puppetboard/static>\r\n        Satisfy Any\r\n        Allow from all\r\n    </Directory>\r\n\r\n    <Directory /usr/lib/python2.6/site-packages/puppetboard>\r\n        WSGIProcessGroup puppetboard\r\n        WSGIApplicationGroup %{GLOBAL}\r\n        Require all granted\r\n    </Directory>\r\n</VirtualHost>\r\n\r\n\r\nWhen I try to hit the app using http://localhost I get internal server.  Below is the /var/log/httpd/puppetboard-error_log.\r\n\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5] mod_wsgi (pid=12926): Target WSGI script '/var/www/html/puppetboard/wsgi.py' cannot be loaded as Python module.\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5] mod_wsgi (pid=12926): Exception occurred processing WSGI script '/var/www/html/puppetboard/wsgi.py'.\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5] Traceback (most recent call last):\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5]   File \"/var/www/html/puppetboard/wsgi.py\", line 6, in <module>\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5]     from puppetboard.app import app as application\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5]   File \"/usr/lib/python2.6/site-packages/puppetboard/app.py\", line 117, in <module>\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5]     abort.mapping[204] = NoContent\r\n[Fri Mar 17 08:15:50 2017] [error] [client 192.168.2.5] AttributeError: 'function' object has no attribute 'mapping'\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] mod_wsgi (pid=12924): Target WSGI script '/var/www/html/puppetboard/wsgi.py' cannot be loaded as Python module.\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] mod_wsgi (pid=12924): Exception occurred processing WSGI script '/var/www/html/puppetboard/wsgi.py'.\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] Traceback (most recent call last):\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]   File \"/var/www/html/puppetboard/wsgi.py\", line 6, in <module>\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]     from puppetboard.app import app as application\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]   File \"/usr/lib/python2.6/site-packages/puppetboard/app.py\", line 117, in <module>\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]     abort.mapping[204] = NoContent\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] AttributeError: 'function' object has no attribute 'mapping'\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] mod_wsgi (pid=12922): Target WSGI script '/var/www/html/puppetboard/wsgi.py' cannot be loaded as Python module.\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] mod_wsgi (pid=12922): Exception occurred processing WSGI script '/var/www/html/puppetboard/wsgi.py'.\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] Traceback (most recent call last):\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]   File \"/var/www/html/puppetboard/wsgi.py\", line 6, in <module>\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]     from puppetboard.app import app as application\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]   File \"/usr/lib/python2.6/site-packages/puppetboard/app.py\", line 117, in <module>\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5]     abort.mapping[204] = NoContent\r\n[Fri Mar 17 08:15:51 2017] [error] [client 192.168.2.5] AttributeError: 'function' object has no attribute 'mapping'\r\n\r\n\r\nBelow is the /var/log/httpd/error_log.\r\n\r\n[Fri Mar 17 08:15:43 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)\r\n[Fri Mar 17 08:15:43 2017] [notice] Digest: generating secret for digest authentication ...\r\n[Fri Mar 17 08:15:43 2017] [notice] Digest: done\r\n[Fri Mar 17 08:15:43 2017] [notice] Apache/2.2.15 (Unix) DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_wsgi/3.2 Python/2.6.6 configured -- resuming normal operations\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:4: ExtDeprecationWarning: Importing flask.ext.wtf is deprecated, use flask_wtf instead.\r\n[Fri Mar 17 08:15:50 2017] [error]   from flask.ext.wtf import Form\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:15: DeprecationWarning: Required is going away in WTForms 3.0, use DataRequired\r\n[Fri Mar 17 08:15:50 2017] [error]   message='A query is required.')])\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:11: FlaskWTFDeprecationWarning: \"flask_wtf.Form\" has been renamed to \"FlaskForm\" and will be removed in 1.0.\r\n[Fri Mar 17 08:15:50 2017] [error]   class QueryForm(Form):\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:33: FlaskWTFDeprecationWarning: \"flask_wtf.Form\" has been renamed to \"FlaskForm\" and will be removed in 1.0.\r\n[Fri Mar 17 08:15:50 2017] [error]   class CatalogForm(Form):\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:4: ExtDeprecationWarning: Importing flask.ext.wtf is deprecated, use flask_wtf instead.\r\n[Fri Mar 17 08:15:50 2017] [error]   from flask.ext.wtf import Form\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:15: DeprecationWarning: Required is going away in WTForms 3.0, use DataRequired\r\n[Fri Mar 17 08:15:50 2017] [error]   message='A query is required.')])\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:11: FlaskWTFDeprecationWarning: \"flask_wtf.Form\" has been renamed to \"FlaskForm\" and will be removed in 1.0.\r\n[Fri Mar 17 08:15:50 2017] [error]   class QueryForm(Form):\r\n[Fri Mar 17 08:15:50 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:33: FlaskWTFDeprecationWarning: \"flask_wtf.Form\" has been renamed to \"FlaskForm\" and will be removed in 1.0.\r\n[Fri Mar 17 08:15:50 2017] [error]   class CatalogForm(Form):\r\n[Fri Mar 17 08:15:51 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:4: ExtDeprecationWarning: Importing flask.ext.wtf is deprecated, use flask_wtf instead.\r\n[Fri Mar 17 08:15:51 2017] [error]   from flask.ext.wtf import Form\r\n[Fri Mar 17 08:15:51 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:15: DeprecationWarning: Required is going away in WTForms 3.0, use DataRequired\r\n[Fri Mar 17 08:15:51 2017] [error]   message='A query is required.')])\r\n[Fri Mar 17 08:15:51 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:11: FlaskWTFDeprecationWarning: \"flask_wtf.Form\" has been renamed to \"FlaskForm\" and will be removed in 1.0.\r\n[Fri Mar 17 08:15:51 2017] [error]   class QueryForm(Form):\r\n[Fri Mar 17 08:15:51 2017] [error] /usr/lib/python2.6/site-packages/puppetboard/forms.py:33: FlaskWTFDeprecationWarning: \"flask_wtf.Form\" has been renamed to \"FlaskForm\" and will be removed in 1.0.\r\n[Fri Mar 17 08:15:51 2017] [error]   class CatalogForm(Form):\r\n\r\npermissions (httpd runs as apache:apache user:group):\r\ndirectory: /var/www/html/\r\ndrwxr-xr-x 2 apache apache 4096 Mar 17 08:19 puppetboard\r\n\r\ndirectory:/var/www/html/puppetboard/\r\n-rw-r--r-- 1 apache apache 1399 Mar 17 08:11 settings.py\r\n-rwxrwxrwx 1 apache apache  212 Mar 17 08:11 wsgi.py\r\n"},"comment":{"url":"https://api.github.com/repos/voxpupuli/puppetboard/issues/comments/288886189","html_url":"https://github.com/voxpupuli/puppetboard/issues/371#issuecomment-288886189","issue_url":"https://api.github.com/repos/voxpupuli/puppetboard/issues/371","id":288886189,"user":{"login":"mterzo","id":360013,"avatar_url":"https://avatars0.githubusercontent.com/u/360013?v=3","gravatar_id":"","url":"https://api.github.com/users/mterzo","html_url":"https://github.com/mterzo","followers_url":"https://api.github.com/users/mterzo/followers","following_url":"https://api.github.com/users/mterzo/following{/other_user}","gists_url":"https://api.github.com/users/mterzo/gists{/gist_id}","starred_url":"https://api.github.com/users/mterzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mterzo/subscriptions","organizations_url":"https://api.github.com/users/mterzo/orgs","repos_url":"https://api.github.com/users/mterzo/repos","events_url":"https://api.github.com/users/mterzo/events{/privacy}","received_events_url":"https://api.github.com/users/mterzo/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T23:00:24Z","updated_at":"2017-03-23T23:00:24Z","body":"Follow my vagrant example for centos6, since you are using vagrant right now.\r\n\r\nI'm uncertain why your having a problem.  "}}
{"actor":{"display_login":"mterzo"}}