On Tue, 16 Mar 2021 12:14:36 -0400, Stephen J. Turnbull wrote:
John Covici writes:
Hi. I am trying to setup postorius, but I have run into a problem. I am using the example project, except I am using postgresql instead of sqlite3. I ran python manage.py migrate which was successful.
On running the development server I get: Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/django/utils/module_loading.py", line 20, in import_string return getattr(module, class_name) AttributeError: module 'postorius.middleware' has no attribute 'APICountingMiddleware'
This appears to be another version mismatch. The APICountingMiddleware appears to be a debugging or development instrumentation tool. It was added on 2021-02-28, so it's very recent. Somehow your Postorius settings.py is newer than your Postorius middleware.py. I would guess you have checked out or pip'ed a very recent version of Postorius but the example_project is picking up an older version, possibly from the Gentoo package. Why that could happen depends on whether you've set up a venv for the up-to-date Postorius, whether it's active, and so on.
I think I know what is happening, but not how to fix. The example_project which the docs told me to get is from the postorius git which is, of course, recent, whereas the postorius I have from the gentoo package is 1.3.3, which is not that old, but maybe not up to the git version. Should I be using the git version?
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it?
John Covici wb2una
covici@ccs.covici.com