I'm almost there!! in deploying EveryBlock's ebcode in my mac OSX - here is my settings.py:
http://pastebin.com/ndQ57LCH
This is the entire error:
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/django/core/servers/basehttp.py", line 280, in run
self.result = application(self.environ, self.start_response)
File "/Library/Python/2.6/site-packages/django/core/servers/basehttp.py", line 674, in __call__
return self.application(environ, start_response)
File "/Library/Python/2.6/site-packages/django/core/handlers/wsgi.py", line 234, in __call__
signals.request_started.send(sender=self.__class__)
File "/Library/Python/2.6/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "/Library/Python/2.6/site-packages/django/db/__init__.py", line 90, in reset_queries
for conn in connections.all():
File "/Library/Python/2.6/site-packages/django/db/utils.py", line 101, in all
return [self[alias] for alias in self]
File "/Library/Python/2.6/site-packages/django/db/utils.py", line 93, in __getitem__
conn = backend.DatabaseWrapper(db, alias)
File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/base.py", line 11, in __init__
self.ops = PostGISOperations(self)
File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 91, in __init__
vtup = self.postgis_version_tuple()
File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 445, in postgis_version_tuple
version = self.postgis_lib_version()
File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 425, in postgis_lib_version
return self._get_postgis_func('postgis_lib_version')
File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 406, in _get_postgis_func
cursor = self.connection._cursor()
File "/Library/Python/2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 121, in _cursor
raise ImproperlyConfigured("You need to specify NAME in your Django settings file.")
ImproperlyConfigured: You need to specify NAME in your Django settings file.
Please advise.
Use either the one-database setup (DATABASE_xxx = ...) or the multiple-database (DATABASES dict) setup
Don't prepend "DATABASE_" to the dictionary keys, e.g. in DATABASES["users"]). This is where the error comes from.
Don't share your database password on SO
I think you might have forgotten to set the NAME property in your DATABASES setting:
DATABASES setting
Related
Trying to set up static assets on a Pyramid app. I used the following call:
config.add_static_view(name='static', path='toolsofknowledge:static')
The file main.css is stored under toolsofknowledge/static/main.css, as expected. The toolsofknowledge package is installed locally with an editable link, using pip3 install -e ..
Requesting http://localhost:8080/static/main.css with curl causes this exception on the server:
amoe#cslp019129 $ PYRAMID_RELOAD_TEMPLATES=1 pserve3 --reload development.ini
Starting monitor for PID 3796.
Starting server in PID 3796.
Serving on http://localhost:8080
Serving on http://localhost:8080
ERROR:waitress:Exception when serving /static/main.css
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 13, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/usr/lib/python3/dist-packages/pyramid/view.py", line 769, in invoke_exception_view
raise HTTPNotFound
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/waitress/channel.py", line 336, in service
task.service()
File "/usr/lib/python3/dist-packages/waitress/task.py", line 175, in service
self.execute()
File "/usr/lib/python3/dist-packages/waitress/task.py", line 452, in execute
app_iter = self.channel.server.application(env, start_response)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/usr/lib/python3/dist-packages/pyramid/view.py", line 768, in invoke_exception_view
reraise_(*exc_info)
File "/usr/lib/python3/dist-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 17, in _error_handler
reraise(*exc_info)
File "/usr/lib/python3/dist-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/usr/lib/python3/dist-packages/pyramid/view.py", line 657, in _call_view
response = view_callable(context, request)
File "/usr/lib/python3/dist-packages/pyramid/viewderivers.py", line 401, in viewresult_to_response
result = view(context, request)
File "/usr/lib/python3/dist-packages/pyramid/static.py", line 102, in __call__
if resource_isdir(self.package_name, resource_path):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1138, in resource_isdir
return get_provider(package_or_requirement).resource_isdir(
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 364, in get_provider
return _find_adapter(_provider_factories, loader)(module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1392, in __init__
self.module_path = os.path.dirname(getattr(module, '__file__', ''))
File "/usr/lib/python3.7/posixpath.py", line 156, in dirname
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Python 3.7, Pyramid 1.10.2.
Solution: add __init__.py to toolsofknowledge directory.
The problem is quite simple -- the toolsofknowledge package was not a real package, despite being installed, as it was missing an __init__.py. This causes toolsofknowledge.__loader__ to be an instance of NamespaceLoader, when it should be SourceFileLoader. Obviously, pkg_resources cannot resolve resources relative to something that's not a real package. Arguably it should handle this case more smoothly though.
I set up a database with mongolab where the db had the same name as the collection. I decided I didnt like this deleted it and made a better naming scheme. I added a new user/password to for the new db and tried to authenticated. It keeps failing. Not sure why. I have double check my credentials and they are correct. I have checked the URI that mongolab provides and that is correct also. This code worked well for the first db.
this is my login code
def __init__(self, user_id, password, database, collection):
# mongodb://<dbuser>:<dbpassword>#ds017205.mlab.com:17205/words
mongodb_uri = "mongodb://" + user_id + ":" + password + "#ds017205.mlab.com:17205/" + database
client = pymongo.MongoClient(mongodb_uri)
db = client[database]
self.collection = db[collection] # is declared in class
this generates the following errors
Error
Traceback (most recent call last):
File "C:\Users\Austin\PycharmProjects\Words\test_mongodb.py", line 15, in testUpdate
results = self.mongodb_obj.update(test)
File "C:\Users\Austin\PycharmProjects\Words\mongodb.py", line 38, in update
upsert=True
File "C:\Python33\lib\site-packages\pymongo\collection.py", line 2235, in update
with self._socket_for_writes() as sock_info:
File "C:\Python33\lib\contextlib.py", line 48, in __enter__
return next(self.gen)
File "C:\Python33\lib\site-packages\pymongo\mongo_client.py", line 718, in _get_socket
with server.get_socket(self.__all_credentials) as sock_info:
File "C:\Python33\lib\contextlib.py", line 48, in __enter__
return next(self.gen)
File "C:\Python33\lib\site-packages\pymongo\server.py", line 152, in get_socket
with self.pool.get_socket(all_credentials, checkout) as sock_info:
File "C:\Python33\lib\contextlib.py", line 48, in __enter__
return next(self.gen)
File "C:\Python33\lib\site-packages\pymongo\pool.py", line 541, in get_socket
sock_info.check_auth(all_credentials)
File "C:\Python33\lib\site-packages\pymongo\pool.py", line 306, in check_auth
auth.authenticate(credentials, self)
File "C:\Python33\lib\site-packages\pymongo\auth.py", line 436, in authenticate
auth_func(credentials, sock_info)
File "C:\Python33\lib\site-packages\pymongo\auth.py", line 416, in _authenticate_default
return _authenticate_scram_sha1(credentials, sock_info)
File "C:\Python33\lib\site-packages\pymongo\auth.py", line 216, in _authenticate_scram_sha1
res = sock_info.command(source, cmd)
File "C:\Python33\lib\site-packages\pymongo\pool.py", line 213, in command
read_concern)
File "C:\Python33\lib\site-packages\pymongo\network.py", line 99, in command
helpers._check_command_response(response_doc, None, allowable_errors)
File "C:\Python33\lib\site-packages\pymongo\helpers.py", line 196, in _check_command_response
raise OperationFailure(msg % errmsg, code, response)
pymongo.errors.OperationFailure: Authentication failed.
Help with this would be appreciated. Thanks
Nothing wrong with the code... the db user set up entered the incorrect password the same twice in the setup box so it was accepted then when the code was trying to use the actual correct answer it wouldn't work for obvious reasons. thanks all for looking
I have to test an existing pyramid application.
I have to set up a local PostgreSQL server with a database with some records.
Then I have to set up a python virtual environment and start web-server for the existing pyramid application.
The application is up and running in localhost but when I try to add a record in the connected(!) db through the web page I receive errors. I suppose that its not connected to the db.
Because I am new with Pyramid and PostgreSQL is there any tutorial which I can follow?
The steps I followed were:
Setup the local PostgreSQL server.
Setup the python virtual environment and start the web-server for the pyramid application (in a different terminal).
ERRORS:
pserve development.ini
Starting server in PID 13630.
serving on http://0.0.0.0:8080
2015-11-22 19:49:10,965 ERROR [waitress][waitress] Exception when serving /get_records
Traceback (most recent call last):
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/waitress-0.8.10-py2.7.egg/waitress/channel.py", line 336, in service
task.service()
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/waitress-0.8.10-py2.7.egg/waitress/task.py", line 169, in service
self.execute()
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/waitress-0.8.10-py2.7.egg/waitress/task.py", line 388, in execute
app_iter = self.channel.server.application(env, start_response)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/router.py", line 223, in __call__
response = self.invoke_subrequest(request, use_tweens=True)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/router.py", line 198, in invoke_subrequest
response = handle_request(request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid_tm-0.12-py2.7.egg/pyramid_tm/__init__.py", line 99, in tm_tween
reraise(*exc_info)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid_tm-0.12-py2.7.egg/pyramid_tm/__init__.py", line 80, in tm_tween
response = handler(request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/router.py", line 145, in handle_request
view_name
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/view.py", line 541, in _call_view
response = view_callable(context, request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/config/views.py", line 351, in rendered_view
result = view(context, request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/config/views.py", line 505, in _requestonly_view
response = view(request)
File "/home/atroul/pyramid_sites/wsyscore/wsyscore/views.py", line 44, in get_records
records = base.database.get_records()
File "/home/atroul/pyramid_sites/wsyscore/wsyscore/Database.py", line 107, in get_records
cursor.execute(sql_sentense, ids)
ProgrammingError: relation "records" does not exist
LINE 1: select * from records;
^
2015-11-22 19:49:12,783 ERROR [waitress][waitress] Exception when serving /record/create_new_record
Traceback (most recent call last):
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/waitress-0.8.10-py2.7.egg/waitress/channel.py", line 336, in service
task.service()
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/waitress-0.8.10-py2.7.egg/waitress/task.py", line 169, in service
self.execute()
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/waitress-0.8.10-py2.7.egg/waitress/task.py", line 388, in execute
app_iter = self.channel.server.application(env, start_response)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/router.py", line 223, in __call__
response = self.invoke_subrequest(request, use_tweens=True)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/router.py", line 198, in invoke_subrequest
response = handle_request(request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid_tm-0.12-py2.7.egg/pyramid_tm/__init__.py", line 99, in tm_tween
reraise(*exc_info)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid_tm-0.12-py2.7.egg/pyramid_tm/__init__.py", line 80, in tm_tween
response = handler(request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/router.py", line 145, in handle_request
view_name
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/view.py", line 541, in _call_view
response = view_callable(context, request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/config/views.py", line 351, in rendered_view
result = view(context, request)
File "/home/atroul/pyramid_sites/env/local/lib/python2.7/site-packages/pyramid-1.6b2-py2.7.egg/pyramid/config/views.py", line 505, in _requestonly_view
response = view(request)
File "/home/atroul/pyramid_sites/wsyscore/wsyscore/views.py", line 141, in create_new_record
record_id = base.database.init_record(main_template)
File "/home/atroul/pyramid_sites/wsyscore/wsyscore/Database.py", line 62, in init_record
cursor.execute(sql_sentense, [psycopg2.extras.Json(initial_record['main'])])
ProgrammingError: relation "records" does not exist
LINE 1: INSERT INTO records (seq, main) VALUES (0, '{"first_names": ...
You try to query SQL table records which does not exist.
Either
Create this table in your database using PostgreSQL clients (command line client)
If you think the table should already exist then fix your SQL query for spelling and refer to correct tables
pgcli - better command line interface for PostgreSQL
On my FreeBSD 10, I managed to install PostgreSQL, Apache Solr and CKAN but when I run paster serve /etc/ckan/default/development.ini I get these error messages (I know there is an issue with CKAN because on my ip:5000 I have a error: connection failed).
Here are the error messages:
$ paster serve /etc/ckan/default/production.ini
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
relative_to=base, global_conf=vars)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
**kw)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
val = callable(*args, **kw)
File "/root/ckan/lib/default/src/ckan/ckan/config/middleware.py", line 58, in make_app
load_environment(conf, app_conf)
File "/root/ckan/lib/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
p.load_all(config)
File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
load(*plugins)
File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 170, in load
plugins_update()
File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 116, in plugins_update
environment.update_config()
File "/root/ckan/lib/default/src/ckan/ckan/config/environment.py", line 357, in update_config
plugin.configure(config)
File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 115, in configure
self._check_urls_and_permissions()
File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 159, in _check_urls_and_permissions
self._log_or_raise('The read-only user has write privileges.')
File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 140, in _log_or_raise
raise DatastoreException(message)
ckanext.datastore.plugin.DatastoreException: The read-only user has write privileges.
What should I do?
Your read-only postgresql user for the datastore database is not setup correctly: the user has write privileges. The relevant part of the docs is: http://docs.ckan.org/en/latest/maintaining/datastore.html#set-permissions
I too faced the problem like this....I have deleted the user "datastore_default" from the postgres. For Deleting the Postgres User Please refer: Postgres Delete user
And create again the postgres user "datastore_default" as per the CKAN Documentation. Please ref: Create User datastore_default for CKAN
I have a Django project that does some calculations in Javascript.
I am using Ghost.py to try and incorporate efficient tests of the Javascript calculations into the Django test suite:
from ghost.ext.django.test import GhostTestCase
class CalculationsTest(GhostTestCase):
def setUp(self):
page, resources = self.ghost.open('http://localhost:8081/_test/')
self.assertEqual(page.http_status, 200)
def test_frobnicate(self):
result, e_resources = self.ghost.evaluate('''
frobnicate(test_data, "argument");
''')
self.assertEqual(result, 1.204)
(where frobnicate() is a Javascript function on the test page.
This works very well if I run one test at a time.
If, however, I run django-admin.py test, I get
Traceback (most recent call last):
...
result = self.run_suite(suite)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/test/runner.py", line 113, in run_suite
).run(suite)
File "/usr/lib64/python2.7/unittest/runner.py", line 151, in run
test(result)
File "/usr/lib64/python2.7/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python2.7/unittest/suite.py", line 108, in run
test(result)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/test/testcases.py", line 184, in __call__
super(SimpleTestCase, self).__call__(result)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/ghost/test.py", line 53, in __call__
self._post_teardown()
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/test/testcases.py", line 796, in _post_teardown
self._fixture_teardown()
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/test/testcases.py", line 817, in _fixture_teardown
inhibit_post_syncdb=self.available_apps is not None)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
return klass.execute(*args, **defaults)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
return self.handle_noargs(**options)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/core/management/commands/flush.py", line 81, in handle_noargs
self.emit_post_syncdb(verbosity, interactive, db)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/core/management/commands/flush.py", line 101, in emit_post_syncdb
emit_post_sync_signal(set(all_models), verbosity, interactive, database)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/core/management/sql.py", line 216, in emit_post_sync_signal
interactive=interactive, db=db)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", line 82, in create_permissions
ctype = ContentType.objects.db_manager(db).get_for_model(klass)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/contrib/contenttypes/models.py", line 47, in get_for_model
defaults = {'name': smart_text(opts.verbose_name_raw)},
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/models/manager.py", line 154, in get_or_create
return self.get_queryset().get_or_create(**kwargs)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/models/query.py", line 388, in get_or_create
six.reraise(*exc_info)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/models/query.py", line 380, in get_or_create
obj.save(force_insert=True, using=self.db)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/transaction.py", line 305, in __exit__
connection.commit()
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/backends/__init__.py", line 168, in commit
self._commit()
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/backends/__init__.py", line 136, in _commit
return self.connection.commit()
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/carl/.virtualenvs/fecfc/lib/python2.7/site-packages/django/db/backends/__init__.py", line 136, in _commit
return self.connection.commit()
django.db.utils.OperationalError: cannot commit - no transaction is active
(running with django-nose gives weirder, inconsistent results)
Any clues on how to prevent this issue, which is currently standing in the way of CI?
I haven't used Ghost myself but for a similar test I had to use TransactionTestCase to get a similar test working. Could you try changing GhostTestCase and see if that's working?