Vanity package for geopython projects
pip install geopython
>>> import geopython
Service Status and QoS Checker for OGC Web Services
Home Page: https://geohealthcheck.org
License: MIT License
Vanity package for geopython projects
pip install geopython
>>> import geopython
As a user
I want to export historical data for any individual resource monitored in JSON or CSV
so that I can use the output programmatically (JSON) or download for tabular analysis (CSV)
Data export is limited to the main list of resources. For example, given the monitoring site http://geohealthcheck.osgeo.org you can export data using http://geohealthcheck.osgeo.org/export
CSV: http://geohealthcheck.osgeo.org/resource/1/csv
JSON: http://geohealthcheck.osgeo.org/resource/1/json
CSV: http://geohealthcheck.osgeo.org/resource/1/history/csv
JSON: http://geohealthcheck.osgeo.org/resource/1/history/json
As a user
I want to search existing web resources using keywords and URL's
So that I can quickly find the resource amongst a large list of resources
Times from/in HTML templates are shown in GMT (Z). Add option, or always show in local/browser's timezone. ... Looks like this needs to be done in Python as the DateTime
strings are generated from their SQLAlchemy/SQLIte UTC values. That makes using the browser's timezone somewhat trickier.
As a user
I want to reset my password
So that I can gain access to the system in the event that the password was forgotten
As a Geo health Check administrator
I want to be able to reset the admin password
So that I can reset the account in the event that the password was forgotten
Issue with GeoHealthCheck's reponsive layout: content can become hidden / inaccessible. See attached screenshot.
The problem: GeoHealthCheck content is hidden at certain browser window width. Because there's no horizontal scrollbar, the content is indeed inaccessible to users for those window widths.
Steps to reproduce: go to http://geohealthcheck.osgeo.org/ or another GHC installation, and resize the window until content becomes inaccessible.
First of all: great work you people are doing on GHC! Planning to use and possibly contribute in the coming time.
Don't know if this app belongs to this repo/project here, but I signal this anyway: http://geohealthcheck.osgeo.org/ has a broken link when clicking Help button: http://geohealthcheck.osgeo.org/static/docs/index.html. Possibly an idea to host the docs on https://readthedocs.org ? Is relatively easy. Hey, that could be my first contrib but one needs project admin rights! ... pff I now see, there is: http://geopython.github.io/GeoHealthCheck/
As a user, admin
I want to configure a resource to expect a certain result from a "test"
So that I can ensure the service is not only alive, but also returning appropriate values.
Looking into the code in particular list_resources()
in views.py
, at about line 55, this may be the cause:
if resource_type is not None:
response['resources'] = models.Resource.query.filter_by(
resource_type=resource_type).all()
if query is not None:
field, term = get_query_field_term(query)
response['resources'] = models.Resource.query.filter(
field.ilike(term)).all()
else:
response['resources'] = models.Resource.query.all()
When a resource_type
is given but query
is None
the filtered response['resources']
is overwritten.
I can test and issue a PR.
Currently help files are served from github.com/geopython/GeoHealthCheck.
To avoid unnecessary traffic, the docs output could be statically served via Flask from local repository
On the page: http://geopython.github.io/
The health check URL should be changed
From: http://geopython.github.io/GeoHealthCheck
To: https://github.com/geopython/GeoHealthCheck
We need to use another service for background layer.
As a user, owner,admin
I want to create separate group to collect all of my web resources
So I am not distracted by resources I am not concerned about.
This feature would allow a single instance of GeoHealthCheck to server multiple stakeholders in a organized fashion within a large organization (such as a government with multiple departments). Adds some enterprise'ness' to it all
Provide a hierarchy such as
As a GeoHealthCheck (GHC) administrator
I want to run GHC as a service
So that I can manage the application as a
Any ideas?
As a user
I want to export data of all resources in JSON and CSV formats
So that I can use JSON programmatically and CSV for tabular data analysis
The export feature on the main page only allows JSON export (eg. http://geohealthcheck.osgeo.org/export)
Change URL pattern to indicate format
http://geohealthcheck.osgeo.org/json
http://geohealthcheck.osgeo.org/resource/1/json
Add a CSV export option
http://geohealthcheck.osgeo.org/csv
http://geohealthcheck.osgeo.org/resource/1/csv
Given JSON from http://geohealthcheck.osgeo.org/export
"resource_type": "OGC:CSW",
"title": "CSW interface for catalog.data.gov",
"url": "http://catalog.data.gov/csw-all"
"ghc_url":"http://geohealthcheck.osgeo.org/resource/1"
"ghg_json":"http://geohealthcheck.osgeo.org/resource/1/json"
"ghg_csv":"http://geohealthcheck.osgeo.org/resource/1/csv"
"last-check":" "
"status":" "
"response time":" "
"reliability":" "
This way a developer can navigate to either the report page, JSON or CSV output from the main
As a user
I would like to provide or override the TITLE attribute of CSW (or other OWS) service when it is missing
So that I can still monitor a service that I have no control over but might have a stake in
My organization publishes data to an external catalog.
I want to ensure that catalog is running because it hosts my data
I have no control over the config, but still want it tracked in GeoHealthChecker
If upon first submitting a GetCapabilities, the title attribute is empty, prompt user for an alternative title so entry can be saved in DB despite being a poorly managed CSW (or nay OWS service actually)
Using putty in Windows as terminal client and nano as editor. Setting the system up on a default 14.04 Ubuntu platform on Amazon.
(GeoHealthCheck)ubuntu@ip-123-123-123-123:~/GeoHealthCheck/GeoHealthCheck$ paver create_secret_key
---> pavement.create_secret_key
Secret key: 5s▒%▒▒▒N3-e▒:㌧[Fk▒d_▒o
Copy/paste this key to set the SECRET_KEY
value in instance/config.py
Something goes wrong in this process and the secret key is not accepted. Most probably to mixing platforms and messing around with charset. Error message:
(GeoHealthCheck)ubuntu@ip-123-123-123-123:~/GeoHealthCheck/GeoHealthCheck$ paver create
---> pavement.create
python GeoHealthCheck/models.py create
Traceback (most recent call last):
File "GeoHealthCheck/models.py", line 40, in
from init import DB
File "/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/init.py", line 36, in
APP.config.from_pyfile('../instance/config.py')
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/flask/config.py", line 129, in from_pyfile
exec(compile(config_file.read(), filename, 'exec'), d.dict)
File "/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/../instance/config.py", line 33
SECRET_KEY = 5s▒%▒▒▒N3-e▒:㌧[Fk▒d_▒o
^
SyntaxError: invalid syntaxCaptured Task Output:
---> pavement.create
python GeoHealthCheck/models.py createBuild failed running pavement.create: Subprocess return code: 1
Might be an issue outside this system. Still - it makes installing the system a bit awkward for a person not too used to setting up services like this.
As a user or administrator
I want to assign a "contact" e-mail for each resource I enter
So that notifications can be sent to other parties responsible for the service or application that is failing.
In some cases there is a need to start 'afresh', removing all existing Run data but without removing all Resources and Users. Truncating/emptying the Run table would normally be sufficient. However, a 'run' with an empty 'Run' table will render an error and no results are committed in Run table. The error occurs on res.last_run.success
in models.py L245 as this var/field will be empty:
last_run_success = res.last_run.success
run_to_add = run_test_resource(res.resource_type, res.url)
run1 = Run(res, run_to_add[1], run_to_add[2],
run_to_add[3], run_to_add[4])
print('Adding run')
DB.session.add(run1)
if APP.config['GHC_NOTIFICATIONS']:
notify(APP.config, res, run1, last_run_success)
As last_run_success
is only used when notification is enabled, it should be checked if res.last_run
exists. Confirmed this in own env. Can provide a PR for this.
@ragnvald: initial Ideas on setup/skeleton for review and comment:
gh_pages
branchHi, I wonder if you can add the internationalization.
Thanks in advance
At the end of the
paver setup
command, I get this output:
Cleaning up...
move path('/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/startbootstrap-sb-admin-2-gh-pages/css') path('/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/css')
Captured Task Output:
---------------------
---> pavement.setup
pip install -r requirements.txt
move path('/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/startbootstrap-sb-admin-2-gh-pages/css') path('/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/css')
Traceback (most recent call last):
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/paver/tasks.py", line 196, in _run_task
return do_task()
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/paver/tasks.py", line 193, in do_task
return func(**kw)
File "pavement.py", line 91, in setup
src_loc.move(dest_loc)
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/paver/path.py", line 69, in wrapper
return dry(msg, func, *args, **kwds)
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/paver/easy.py", line 15, in dry
return func(*args, **kw)
File "/usr/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: path('/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/startbootstrap-sb-admin-2-gh-pages/css')
I then created that folder, then i get the same message for folder
/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/startbootstrap-sb-admin-2-gh-pages/font-awesome-4.1.0
/home/ubuntu/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/static/lib/startbootstrap-sb-admin-2-gh-pages/fonts
The js and less subpaths are moved successfully and the setup finishes correctly.
failures with Flask-Login 0.3.0, but works with 0.2.11
One a new CentOS 7 system I tried installing GHC.
There were various deps that were required (eg develop RPM package), paver through some errors along the way (complaining about gcc).
Then once i tried to srtat the app the service ran but we were getting errors due to the templates.
A temp fix was in line 48 of the layout.html file we remove the enclosed brackets.
The long term fix was to:
pip uninstall Flask-Login
pip install Flask-Login==0.2.11
Cheers
Trying to go through the setup procedure as indicated in readme.md.
Second line leaves me puzzled.
1: virtualenv GeoHealthCheck && cd $_
2: . bin/activate
Is this really one line?
Still trying to start the service. Tried as plain user (default ubuntu user) and also under sudo bash. This is what happens:
(GeoHealthCheck)root@ip-172-31-20-6:
/GeoHealthCheck/GeoHealthCheck# paver create/GeoHealthCheck/GeoHealthCheck# python GeoHealthCheck/models.py drop
---> pavement.create
python GeoHealthCheck/models.py create
Creating database objects
Creating superuser account
Enter your username: ragnvald
Enter your password: verysecretpass
Enter your password again: verysecretpass
Enter your email: myemail@no
Enter your email again: myemail@no
(GeoHealthCheck)root@ip-172-31-20-6:
Dropping database objects
(GeoHealthCheck)root@ip-172-31-20-6:~/GeoHealthCheck/GeoHealthCheck# python GeoHealthCheck/app.py
- Running on http://0.0.0.0:8000/
- Restarting with reloader
Stops the process with control-c, since it looks much like it is hanging. Trying again with the public IP for the virtual computer:
^C(GeoHealthCheck)root@ip-172-31-20-6:~/GeoHealthCheck/GeoHealthCheck# python GeoHealthCheck/app.py 54.76.210.109:8000
- Running on http://54.76.210.109:8000/
Traceback (most recent call last):
File "GeoHealthCheck/app.py", line 308, in
APP.run(host=HOST, port=int(PORT), use_reloader=True, debug=True)
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/flask/app.py", line 772, in run
run_simple(host, port, self, *_options)
File "/home/ubuntu/GeoHealthCheck/local/lib/python2.7/site-packages/werkzeug/serving.py", line 706, in run_simple
test_socket.bind((hostname, port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(_args)
socket.error: [Errno 99] Cannot assign requested address
(GeoHealthCheck)root@ip-172-31-20-6:~/GeoHealthCheck/GeoHealthCheck#
So still struggling here. Not sure what I mess up. But I do think that the install info for the user could be more elaborate.
As a user
I want to see a small line chart to visualize health trend of all resources over time
So I can quickly examine and compare all resources on the main page.
Given a monitoring page such as: http://geohealthcheck.osgeo.org/:
Check out the dashboard for PIWIK here: http://demo.piwik.org/index.php?module=MultiSites&action=index&idSite=3&period=day&date=yesterday
Standard setup via Paver/pavement.py
will call sphinx-build
to generate documentation. This requires PyPy package Sphinx to be present. Requirements are installed in pavement.py setup()
via sh('pip install -r requirements.txt')
. The current version of requirements.txt
does not contain Sphinx
(only requirements-dev.txt
). This caused an install error on a clean Ubuntu 14.04 system.
If notification is enabled GHC will send email on status changes: e.g. Failing
when a Resource fails, Fixed
when it succeeds again. But when a Resource is e.g. out of order for a longer period the status Still Failing
will be sent on each Run. In most uptime monitors this status is never sent. In cases, e.g. when a server has multiple OWS services or many WWW:LINKs one may get flooded with emails that don't add anything that we already know.
My proposal is to skip notification for the result Still Failing
: a Resource may be temporarily down. The first email Failing
and a second Fixed
would IMO be sufficient. We can derive that in between these statuses the Resource is Still Failing
. Another option is to make notification for this status configurable (default False), but I doubt that users will apply this.
The fix is utterly simple, I can commit that, but maybe there were strong reasons for Still Failing
notifications.
As reported by @archaeogeek, looks like the GeoIP service in use is no longer available.
Switch the provider and refactor such that this functionality can be reused.
Installation in a scenario on a windows machine behind a reverse proxy with authentication. Issues and code suggestion are below. If a PR is needed for suggestion 3 let me know.
Issue 1:
Executing <> - excerpt from the messages
......
stall\virtualenvironment\geohealthcheck\lib\site-packages (from Flask->Flask-Log
in==0.2.11->-r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in g:\inst
all\virtualenvironment\geohealthcheck\lib\site-packages (from Flask->Flask-Login
==0.2.11->-r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in g:\install
\virtualenvironment\geohealthcheck\lib\site-packages (from python-dateutil>=1.5-
>OWSLib->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in g:\insta
ll\virtualenvironment\geohealthcheck\lib\site-packages (from Jinja2>=2.4->Flask-
>Flask-Login==0.2.11->-r requirements.txt (line 1))
---> pavement.setup
pip install -r requirements.txt
Traceback (most recent call last):
File "g:\install\virtualenvironment\geohealthcheck\lib\site-packages\paver\tas
ks.py", line 196, in _run_task
return do_task()
File "g:\install\virtualenvironment\geohealthcheck\lib\site-packages\paver\tas
ks.py", line 193, in do_task
return func(**kw)
File "pavement.py", line 87, in setup
zipstr = StringIO(urlopen(skin).read())
File "G:\apps\Python27\Lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "G:\apps\Python27\Lib\urllib2.py", line 431, in open
response = self._open(req, data)
File "G:\apps\Python27\Lib\urllib2.py", line 449, in _open
'_open', req)
File "G:\apps\Python27\Lib\urllib2.py", line 409, in _call_chain
result = func(*args)
File "G:\apps\Python27\Lib\urllib2.py", line 1240, in https_open
context=self._context)
File "G:\apps\Python27\Lib\urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify fai
led (_ssl.c:590)>
All requirements are satisfied - I believe its due to the downloading of files from pavement.py - line ~73..106 .. I performed the steps manually and it compiled afterwards. There are plenty of websites with issues with the certificate problem, however I'm wondering if the iostring used is aware of the reverse proxy authentication set outside via SET HTTPS_PROXY or SET HTTP_PROXY
Issue 2:
To run the application inside an closed system I suggest to move the leaflet CDN/IE9 code in to a local file (e.g. static/lib ) so following code changes for
add to layout.html
L15
L20+21 <script src="{{ url_for('static', filename='lib/html5shiv.min.js') }}"></script>
<script src="{{ url_for('static', filename='lib/respond.min.js') }}"></script>
L112 <script src="{{ url_for('static', filename='lib/leaflet-0.6.4/leaflet.js') }}"></script>
and to be added in setup() in pavement.py for downloading these files.
Issue 3:
Add on feature - WMS service configurable in the config.py so the site background WMS can be specified.
add to config.py in line 44
GHC_BACKGROUNDWMS_URL = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png'
GHC_BACKGROUNDWMS_CENTER_LAT = 1.1
GHC_BACKGROUNDWMS_CENTER_LON =1.1
GHC_BACKGROUNDWMS_MAXZOOM = 2
GHC_BACKGROUNDWMS_SUBDOMAINS = '1234'
in templates\home.html line 184 ff replace current by
var map = L.map('all-resources-map').setView([{{ config['GHC_BACKGROUNDWMS_CENTER_LAT'] }},{{ config['GHC_BACKGROUNDWMS_CENTER_LON'] }}], 1);
map.addLayer(new L.TileLayer(
'{{ config['GHC_BACKGROUNDWMS_URL'] }}', {
maxZoom: {{ config['GHC_BACKGROUNDWMS_MAXZOOM'] }},
subdomains: '{{ config['GHC_BACKGROUNDWMS_SUBDOMAINS'] }}'
}
));
map.addLayer(new L.TileLayer(
'{{ config['GHC_BACKGROUNDWMS_URL'] }}', {
maxZoom: {{ config['GHC_BACKGROUNDWMS_MAXZOOM'] }},
subdomains: '{{ config['GHC_BACKGROUNDWMS_SUBDOMAINS'] }}'
}
));
The settings are partly translated (e.g. History and Days) however the testing frequency is not translated (e.g. 'hourly','daily','weekly','monthly','yearly'). Should we translate it as well.
Should we store in the DB in a settings table ? or to complex ?
Suggestion: drive the cron jobs from that setting in the DB as well?
Trying to install GHC master sept 13, 2016 on Ubuntu 14.04 with Paver 1.2.1, Python 2.7, I get this error message:
vagrant@vagrant-ubuntu-trusty-64:/var/www/ghc$ sudo paver setup
---> pavement.setup
mkdir /var/www/ghc/instance
mkdir /var/www/ghc/instance/data
Captured Task Output:
---------------------
---> pavement.setup
mkdir /var/www/ghc/instance
mkdir /var/www/ghc/instance/data
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/paver/tasks.py", line 195, in _run_task
return do_task()
File "/usr/lib/pymodules/python2.7/paver/tasks.py", line 192, in do_task
return func(**kw)
File "pavement.py", line 71, in setup
data_dir.chmod(0777)
File "/usr/lib/pymodules/python2.7/paver/path.py", line 66, in wrapper
msg = name + ' ' + ' '.join(args)
TypeError: sequence item 1: expected string, int found
The failure comes from /usr/lib/pymodules/python2.7/paver/path.py
line 66, wheremsg = name + ' ' + ' '.join(args)
expects a string, not an int (0777). But when I change in pavement.py line 71 to data_dir.chmod('0777')
I obviously get another error:
---> pavement.setup
mkdir /var/www/ghc/instance
mkdir /var/www/ghc/instance/data
chmod /var/www/ghc/instance/data 0777
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/paver/tasks.py", line 195, in _run_task
return do_task()
File "/usr/lib/pymodules/python2.7/paver/tasks.py", line 192, in do_task
return func(**kw)
File "pavement.py", line 71, in setup
data_dir.chmod('0777')
File "/usr/lib/pymodules/python2.7/paver/path.py", line 69, in wrapper
return dry(msg, func, *args, **kwds)
File "/usr/lib/pymodules/python2.7/paver/easy.py", line 18, in dry
return func(*args, **kw)
File "/usr/lib/pymodules/python2.7/paver/deps/path2.py", line 924, in chmod
os.chmod(self, mode)
TypeError: an integer is required
A second run of paver setup
goes ok as the errored line is skipped (instance
dir exists).
Commenting out the line data_dir.chmod(0777)
gives no errors.
This may be due to my combination of Python & Paver versions? I will look further. But chmod()
should be a normal function for Paver Bunch
instances. As a last resort os.chmod()
may be called directly but this defeats the purpose of Paver...
Any insights welcome!
As a user or admin
I want to have a "total resources" count
So that I can quickly report on how many services are tracked.
As a user of GeoHealthCheck (GHC)
I want to see both the last response time and average response time of all resources on the main dashboard
So that I can compare the most recent test response to the average response time
In my docker container, cron trigger such error:
Traceback (most recent call last):
File "models.py", line 255, in <module>
notify(APP.config, res, run1, last_run_success)
File "/GeoHealthCheck/GeoHealthCheck/notifications.py", line 53, in notify
result = gettext('Passing')
File "/venv/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 538, in gettext
t = get_translations()
File "/venv/local/lib/python2.7/site-packages/flask_babel/__init__.py", line 215, in get_translations
babel = current_app.extensions['babel']
File "/venv/local/lib/python2.7/site-packages/werkzeug/local.py", line 343, in __getattr__
return getattr(self._get_current_object(), name)
File "/venv/local/lib/python2.7/site-packages/werkzeug/local.py", line 302, in _get_current_object
return self.__local()
File "/venv/local/lib/python2.7/site-packages/flask/globals.py", line 34, in _find_app
raise RuntimeError('working outside of application context')
RuntimeError: working outside of application context
Any idea why?
As a developer
I want to programmatically Create, read, update delete resources
So that I can integrate health checking into my application
As a user
I want to be able to add resources and execute "test now" while background hourly cron job are running
So that I don't break the system
Follow recommendations for "session" stuff. "consider using a session.no_autoflush block if this flush is occurring prematurely "
I wonder if this happened because I was entering a new resource at 3pm and the cronjob script would have been running.
Perhaps consider some “session” stuff to avoid errors when script runs at CRON time.
sqlalchemy.exc.InvalidRequestError
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (OperationalError) database is locked u'UPDATE resource SET title=? WHERE resource.identifier = ?' (u'DEV: EC Data Catalogue External', 40)
Traceback (most recent call last)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
• File "/home/sampsond/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/app.py", line 135, in home
response = views.list_resources(resource_type)
• File "/home/sampsond/GeoHealthCheck/GeoHealthCheck/GeoHealthCheck/views.py", line 54, in list_resources
resource_type=resource_type).all()
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2320, in all
return list(self)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2438, in iter
return self._execute_and_instances(context)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2451, in _execute_and_instances
close_with_result=True)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2442, in _connection_from_session
**kw)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 305, in _connection_for_bind
self._assert_active()
• File "/home/sampsond/GeoHealthCheck/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 214, in _assert_active
% self._rollback_exception
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (OperationalError) database is locked u'UPDATE resource SET title=? WHERE resource.identifier = ?' (u'DEV: EC Data Catalogue External', 40)
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
• dump() shows all variables in the frame
• dump(obj) dumps all that's known about the object
As a developer
The users want to hide show some options, graphics.
Default configuration for map uses Maquest so needs changing to use something free
I'm trying to investigate why Geohealthcheck is not sending me any emails and have added an incorrect URL that it should choke on. When I run "python models.py run" manually (virtual environment activated) I can see that it marks the status of the resource as "Changed" but then I get the following error and no email is sent:
Traceback (most recent call last):
File "models.py", line 250, in
notify(APP.config, res, run1, last_run_success)
File "/home/apps/GeoHealthCheck/GeoHealthCheck/notifications.py", line 71, in notify
msg = render_template2('notification_email.txt', template_vars)
File "/home/apps/GeoHealthCheck/GeoHealthCheck/util.py", line 121, in render_template2
translations = translation('messages', 'GeoHealthCheck/translations')
File "/usr/lib/python2.7/gettext.py", line 484, in translation
raise IOError(ENOENT, 'No translation file found for domain', domain)
IOError: [Errno 2] No translation file found for domain: 'messages'
So far, I've checked the SMTP settings manually using the smtplib library at a command prompt (lifting the syntax from notifications.py) and as far as I'm concerned that seems to be working fine. The only other change I have made is also to notifications.py, to add a couple of print statements in to find out where in the process the code is choking. No changes have been made to the email template.
Hi,
I understand you are using Babel [1] to manage i18n in the project. What is the recommended way to translate? Just creating new files for new languages, and editing these files, o is there a recommended web or GUI interface for this?
As a GeoHealthChecker (GHC) user
I want to select a time scale for historical tests of each resource
So that I can "zoom in" "zoom out" on the time scale to further investigate patterns and trends
I am working to a Docker images for GeoHealthCheck and I need a way to create the admin user (login, password, email) in a non interactive way.
Is there a way to access resources requiring authentication?
As a user, developer
I have more than 1 million records in the table 'run' amount , and the charging time of the main page takes too long to load.
Create an option to display the 'Status' and 'Response times' from a certain time, such as 1, 2, 3 ... months ago.
With email notification enabled I receive only failure notice emails with Still Failing
in the subject line, never any of the other two expected subject texts: Failing
or Fixed
. Especially when testing by dis/enabling remote OWS services or URLs I would expect all three subject lines. (Passing
is by design never sent). This is at first sight quite strange as the code in notifications.py L39 is quite clear:
def notify(config, resource, run, last_run_success):
"""execute a notification"""
status_changed = False
this_run_success = run.success
if last_run_success and not this_run_success:
result = gettext('Failing')
elif not last_run_success and this_run_success:
result = gettext('Fixed')
elif not last_run_success and not this_run_success:
result = gettext('Still Failing')
elif last_run_success and this_run_success:
result = gettext('Passing')
if result != gettext('Passing'):
status_changed = True
if not status_changed:
return
# send email if got here
So notify()
would be called with all combinations of last and current run statuses. So why only Still Failing
passing through? My theory is that there is a mismatch in Boolean and Number types as used in the combination of Sqlite3, SQLAlchemy and Python boolean, as also Passing
will get through (not triggering email).
I will dive in further, maybe someone already has clues.
I have problems with adding a WMS 1.3.0. It is currently supported ?:
The link is:
On a fresh installation, i have a 404 on paver setup when it tries to get http://github.com/IronSummitMedia/startbootstrap-sb-admin-2/archive/v1.0.3.zip
It seems that the master branch of IronSummitMedia/startbootstrap-sb-admin-2 has been completely crushed recently, so no more link for 1.0.3 version.
related issue : StartBootstrap/startbootstrap-sb-admin-2#1
Is replacing IronSummitMedia/startbootstrap-sb-admin-2 with BlackrockDigital/startbootstrap-sb-admin-2 a good workaround ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.