On 5/1/22 21:50, Mark Sapiro wrote:
First, thanks a lot Mark for your guidance.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the SocialAccountConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
This is from Django >=3.2 can be fixed by adding
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
to your settings. This has been done in HyperKitty's example_project/settings.py for the not yet released 1.3.6 version.
These warnings are only warnings, they aren't fatal.
I thought so. I've added it in the settings.py file.
In the last part of your suggestions you wrote:
"I suggest you do
pip install --upgrade hyperkitty mailman-hyperkitty
and ensure it installs hyperkitty 1.3.5 and mailman-hyperkitty 1.2.0"
But this is exactly what made me fall in this mess: I realized that the versions of hiperkitty and mailman-hiperkitty in that server were outdated.. and I tried update them separately, forgetting the saying "if it works, don't touch it" (si funciona, no lo toques).
In my first message I listed the versions of all the items, but to refresh it, as they are now:
(from pip list)
...
gunicorn 20.1.0 HyperKitty 1.3.5
...
mailman 3.3.5 mailman-hyperkitty 1.2.0 mailmanclient 3.3.3
...
mistune 2.0.1
...
mod-wsgi 4.7.1 ...
postorius 1.3.6
(end of pip list)
I did the upgrade of all of it.
The "migration" process output the same warning as before about to doing a "makemigration" (I did not this time)
Thinking that the problem in the "migrate" and "makemigration" process could be that I touched the mistune/scanner.py to add escape and escape_html imports, I deleted that two lines.
Then all went bad: the postorius list page didn't show anymore. The error.log form the apache server shows
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'hyperkitty.templatetags.decorate': cannot import name 'escape_html' from 'mistune.scanner' (/usr/local/lib/python3.7/site-packages/mistune/scanner.py)
So I tried to put them back (but I had problems with, I believe, the __pychache__). I had to reinstall mistune and write back this lines that I found in a previous thread from William Oliver last 12/28/21
I've finally came back to administering the lists via postorius.
I created a new list to do the tests without disturbing the rest. And now I am at the exact same point: No message is archived and the log shows:
ERROR 2022-01-06 12:38:45,574 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-06 12:38:45,586 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-06 12:38:45,801 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-06 12:38:45,832 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-06 12:38:45,847 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-06 12:38:45,867 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-06 12:38:46,075 39059 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
As this server has very low traffic, the emails are distributing well, and the only thing that fails is the archiving of new messages, I will wait until a more complete upgrading process is needed for mailman, postorius or hiperkitty.
Thanks, again, for your support.
P.S.: One thing that make me curious is the "mistune" package... I don't see it installed in the other servers that are working flawlessly with mailman3.
...
Running a 'su -m mailman3 -c "python3 manage.py makemigrations" shows the same warning listed before and some new errors:
*-*-*-*-*-*-*
Migrations for 'postorius': /usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py
- Alter field name on emailtemplate Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 89, in wrapped res = handle_func(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/makemigrations.py", line 190, in handle self.write_migration_files(changes) File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/makemigrations.py", line 228, in write_migration_files with open(writer.path, "w", encoding='utf-8') as fh: PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py'
*-*-*-*-*-*-*
The file '/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py' does not exist at all
makemigrations is trying to create that migration and you don't have permission to create the file. I don't know why it's trying to do that. Postorius 1.3.6 has migrations through 0016_auto_20210810_2157.py and shouldn't need more. To you have modificationd to Postorius?
Despite the error, I did a 'su -m mailman3 -c "python3 manage.py compress"' and the subsequent "django-admin compilemessages" in
/usr/local/lib/python3.7/site-packages/postorius, ../hyperkitty and ../django_mailman3
And the log continues showing the same error when trying archive a new message.
ERROR 2022-01-05 12:27:31,406 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:31,418 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:31,685 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:32,045 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:32,070 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:32,093 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
These messages come from some HyperKitty version between commit b415d29d6cc59b3270c35b03ba3313dd03450271 Mon Jun 21 00:11:48 2021 -0700 and commit c6272f3ef8375865382d0741d3d371a0dc41508a Fri Oct 8 06:32:06 2021 +0000
They do not come from HyperKitty 1.3.5 but from something later than 1.3.4 which makes be think your mailman-hyperkitty version is not 1.2.0 either.
I suggest you do
pip install --upgrade hyperkitty mailman-hyperkitty
and ensure it installs hyperkitty 1.3.5 and mailman-hyperkitty 1.2.0
--
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: image/png Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.