Hi Everyone,
I am pleased to announce new stable releases for:
- Postorius: 1.3.3 Changelog: https://docs.mailman3.org/projects/postorius/en/latest/news.html#id1 Download: https://pypi.org/project/postorius/1.3.3/
- Hyperkitty: 1.3.3 Changelog: https://hyperkitty.readthedocs.io/en/latest/news.html#id1 Download: https://pypi.org/project/HyperKitty/1.3.3rc1/
- Mailmanclient: 3.3.1 Changelog: https://docs.mailman3.org/projects/mailmanclient/en/latest/src/mailmanclient... Download: https://pypi.org/project/mailmanclient/3.3.1/
- Django-mailman3: 1.3.3 Changelog: https://gitlab.com/mailman/django-mailman3/-/blob/master/README.rst Download: https://pypi.org/project/django-mailman3/1.3.3
Python 3.6+ and Django 2.0+ is supported for all of them. Django 3.0 support for Hyperkitty requires manually upgrading a dependency (django-haystack>=3.0b2, once a stable version of this has been released, it shouldn't require manually upgrading).
There are tons of bug-fixes across the board and some new features.
Biggest visible change is switch to Bootstrap 4, which has been long pending for us. Bootstrap 4 completely changes the CSS grid model using the new Flexbox. There might be some small changes or breakages when using on mobile. Please report such issues to us via Gitlab!
Some other notable changes are in Postorius, which includes many more list settings exposed include content filtering settings, bounce processing (which was added in the previous release of Mailman Core) settings and some other ones. Settings page is also slightly different with all the sections on the vertical menu on left instead of horizontal tabs. You can now also specify a reason when rejecting held messages.
There was also a gnarly bug, which caused the name of some members to be the string "None". For the longest time, I couldn't figure out the reason for it, but it ended up being a simple fix in mailmanclient's json serialization of display_name, which would result in Python's None value being passed as string "None" to Mailman's API for subscription.
There is also better support for filtering visible lists based on the current vhost, which I see a few people are already waiting for from mailman-users list.
A full changelog has been added to each project in the top.
thanks, Abhilash Raj (maxking)
On Tue, Jun 2, 2020, at 12:19 PM, Abhilash Raj wrote:
Hi Everyone,
I am pleased to announce new stable releases for:
- Postorius: 1.3.3 Changelog: https://docs.mailman3.org/projects/postorius/en/latest/news.html#id1 Download: https://pypi.org/project/postorius/1.3.3/
- Hyperkitty: 1.3.3 Changelog: https://hyperkitty.readthedocs.io/en/latest/news.html#id1 Download: https://pypi.org/project/HyperKitty/1.3.3rc1/
This is a wrong URL and right one should be:
Download: https://pypi.org/project/HyperKitty/1.3.3
Abhilash
-- thanks, Abhilash Raj (maxking)
Hi Abhilash,
Thank you for the releases!
I've updated my installation and I'm confused by this Postorius announcement:
Settings page is also slightly different with all the sections on the vertical menu on left instead of horizontal tabs.
I have Postorius verson 1.3.3 but I still see horizontal tabs not vertical menus.
Could you elaborate more on this?
Best regards, Danil Smirnov
On Tue, 2 Jun 2020 at 22:21, Abhilash Raj <maxking@asynchronous.in> wrote:
Hi Everyone,
I am pleased to announce new stable releases for:
- Postorius: 1.3.3 Changelog: https://docs.mailman3.org/projects/postorius/en/latest/news.html#id1 Download: https://pypi.org/project/postorius/1.3.3/
- Hyperkitty: 1.3.3 Changelog: https://hyperkitty.readthedocs.io/en/latest/news.html#id1 Download: https://pypi.org/project/HyperKitty/1.3.3rc1/
- Mailmanclient: 3.3.1 Changelog: https://docs.mailman3.org/projects/mailmanclient/en/latest/src/mailmanclient... Download: https://pypi.org/project/mailmanclient/3.3.1/
- Django-mailman3: 1.3.3 Changelog: https://gitlab.com/mailman/django-mailman3/-/blob/master/README.rst Download: https://pypi.org/project/django-mailman3/1.3.3
Python 3.6+ and Django 2.0+ is supported for all of them. Django 3.0 support for Hyperkitty requires manually upgrading a dependency (django-haystack>=3.0b2, once a stable version of this has been released, it shouldn't require manually upgrading).
There are tons of bug-fixes across the board and some new features.
Biggest visible change is switch to Bootstrap 4, which has been long pending for us. Bootstrap 4 completely changes the CSS grid model using the new Flexbox. There might be some small changes or breakages when using on mobile. Please report such issues to us via Gitlab!
Some other notable changes are in Postorius, which includes many more list settings exposed include content filtering settings, bounce processing (which was added in the previous release of Mailman Core) settings and some other ones. Settings page is also slightly different with all the sections on the vertical menu on left instead of horizontal tabs. You can now also specify a reason when rejecting held messages.
There was also a gnarly bug, which caused the name of some members to be the string "None". For the longest time, I couldn't figure out the reason for it, but it ended up being a simple fix in mailmanclient's json serialization of display_name, which would result in Python's None value being passed as string "None" to Mailman's API for subscription.
There is also better support for filtering visible lists based on the current vhost, which I see a few people are already waiting for from mailman-users list.
A full changelog has been added to each project in the top.
thanks, Abhilash Raj (maxking)
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
On 6/8/20 4:01 PM, Danil Smirnov wrote:
I have Postorius verson 1.3.3 but I still see horizontal tabs not vertical menus.
Could you elaborate more on this?
Best regards, Danil Smirnov
Try ctrl key and F5 to hard refresh the page in your browser.
-- Please let me know if you need further assistance.
Thank you for your business. We appreciate our clients. Brian Carpenter EMWD.com
-- EMWD's Knowledgebase: https://clientarea.emwd.com/index.php/knowledgebase
EMWD's Community Forums http://discourse.emwd.com/
On 6/8/20 1:01 PM, Danil Smirnov wrote:
I have Postorius verson 1.3.3 but I still see horizontal tabs not vertical menus.
Could you elaborate more on this?
The first row of horizontal tabs is unchanged, but the Settings
tab
used to have a second horizontal row and now has a vertical list on the
left.
After you upgraded did you run these django-admin commands?
django-admin collectstatic --clear --noinput --verbosity 0
django-admin compress
django-admin compilemessages
django-admin migrate
These 4 commands should be run after every update to Postorius, HyperKitty or django_mainlman3.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, 9 Jun 2020 at 00:05, Mark Sapiro <mark@msapiro.net> wrote:
The first row of horizontal tabs is unchanged, but the
Settings
tab used to have a second horizontal row and now has a vertical list on the left.
Yeah Mark, thanks - now I see it :)
After you upgraded did you run these django-admin commands?
django-admin collectstatic --clear --noinput --verbosity 0 django-admin compress django-admin compilemessages django-admin migrate
These 4 commands should be run after every update to Postorius, HyperKitty or django_mainlman3.
Hm, interesting... Could you point me to some related docs please?
To upgrade, I've just bumped app versions in my Dockerfiles, built and restarted... Mailman-core worked right away with no issues. Mailman-web (Hyperkitty) failed with the error:
ERROR 2020-06-08 19:46:41,942 14 django.request Internal Server Error: /hyperkitty/ Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/compressor/base.py", line 282, in precompile mod = import_module(mod_name) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'sassc -t compressed {infile} {outfile}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python3.6/site-packages/hyperkitty/views/index.py", line 118, in index return render(request, "hyperkitty/index.html", context) File "/usr/lib/python3.6/site-packages/django/shortcuts.py", line 36, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/lib/python3.6/site-packages/django/template/loader.py", line 62, in render_to_string return template.render(context, request) File "/usr/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 171, in render return self._render(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 163, in _render return self.nodelist.render(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 937, in render bit = node.render_annotated(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated return self.render(context) File "/usr/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render return compiled_parent._render(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 163, in _render return self.nodelist.render(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 937, in render bit = node.render_annotated(context) File "/usr/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated return self.render(context) File "/usr/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 143, in render return self.render_compressed(context, self.kind, self.mode, forced=forced) File "/usr/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 119, in render_compressed rendered_output = compressor.output(mode, forced=forced, basename=file_basename) File "/usr/lib/python3.6/site-packages/compressor/css.py", line 46, in output ret.append(subnode.output(*args, **kwargs)) File "/usr/lib/python3.6/site-packages/compressor/css.py", line 48, in output return super(CssCompressor, self).output(*args, **kwargs) File "/usr/lib/python3.6/site-packages/compressor/base.py", line 314, in output output = '\n'.join(self.filter_input(forced)) File "/usr/lib/python3.6/site-packages/compressor/base.py", line 254, in filter_input for hunk in self.hunks(forced): File "/usr/lib/python3.6/site-packages/compressor/base.py", line 228, in hunks precompiled, value = self.precompile(value, **options) File "/usr/lib/python3.6/site-packages/compressor/base.py", line 287, in precompile return True, filter.input(**kwargs) File "/usr/lib/python3.6/site-packages/compressor/filters/base.py", line 239, in input return super(CachedCompilerFilter, self).input(**kwargs) File "/usr/lib/python3.6/site-packages/compressor/filters/base.py", line 206, in input raise FilterError(err) compressor.exceptions.FilterError: Error: It's not clear which file to import for '@import "../libs/bootstrap/stylesheets/bootstrap"'. Candidates: ../libs/bootstrap/stylesheets/_bootstrap.scss ../libs/bootstrap/stylesheets/bootstrap.scss Please delete or rename all but one of these files. on line 4 of ../mailman-web-data/static/hyperkitty/sass/hyperkitty.scss
@import "../libs/bootstrap/stylesheets/bootstrap";
I've fixed the error by removing the older file which is /opt/mailman-web-data/static/hyperkitty/libs/bootstrap/stylesheets/_bootstrap.scss
After that everything seems to be working fine.
My best regards, Danil Smirnov
On 6/9/20 1:05 AM, Danil Smirnov wrote:
On Tue, 9 Jun 2020 at 00:05, Mark Sapiro <mark@msapiro.net> wrote:
After you upgraded did you run these django-admin commands?
django-admin collectstatic --clear --noinput --verbosity 0 django-admin compress django-admin compilemessages django-admin migrate
These 4 commands should be run after every update to Postorius, HyperKitty or django_mainlman3.
Hm, interesting... Could you point me to some related docs please?
The documentation is weak and should be updated, but see <https://docs.mailman3.org/en/latest/upgrade-3.2.html#migration-steps>
To upgrade, I've just bumped app versions in my Dockerfiles, built and restarted... Mailman-core worked right away with no issues. Mailman-web (Hyperkitty) failed with the error:
ERROR 2020-06-08 19:46:41,942 14 django.request Internal Server Error: /hyperkitty/ Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/compressor/base.py", line 282, in precompile mod = import_module(mod_name) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'sassc -t compressed {infile} {outfile}' ... I've fixed the error by removing the older file which is /opt/mailman-web-data/static/hyperkitty/libs/bootstrap/stylesheets/_bootstrap.scss
After that everything seems to be working fine.
I'm not sure about the above error.
'sassc -t compressed {infile} {outfile}'
is defined in settings
COMPRESS_PRECOMPILERS, but it is a command to
be run as part of django-admin compress
, not a module to be imported.
Possibly running django-admin compress
before starting Hyperkitty
would have avoided this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, 9 Jun 2020 at 19:01, Mark Sapiro <mark@msapiro.net> wrote:
I'm not sure about the above error.
'sassc -t compressed {infile} {outfile}'
is defined in
settings
COMPRESS_PRECOMPILERS, but it is a command to be run as part ofdjango-admin compress
, not a module to be imported.Possibly running
django-admin compress
before starting Hyperkitty would have avoided this.
Well, if I run "./manage.py compress" in the mailman-web container, I'm getting
CommandError: Offline compression is disabled. Set COMPRESS_OFFLINE or use the --force to override.
Danil
On 6/9/20 10:17 AM, Danil Smirnov wrote:
Well, if I run "./manage.py compress" in the mailman-web container, I'm getting
CommandError: Offline compression is disabled. Set COMPRESS_OFFLINE or use the --force to override.
Do you have settings like
COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'), )
COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
in your settings?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, 9 Jun 2020 at 20:23, Mark Sapiro <mark@msapiro.net> wrote:
Do you have settings like
COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'), )
I have
COMPRESS_PRECOMPILERS = ( ('text/less', 'lessc {infile} {outfile}'), ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'), )
COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
These two are commented out.
Danil
On 6/9/20 10:31 AM, Danil Smirnov wrote:
On Tue, 9 Jun 2020 at 20:23, Mark Sapiro <mark@msapiro.net> wrote:
COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
These two are commented out.
Then compress shouldn't be trying to do anything. I can't explain what's going on.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
The issue has confirmed by other users:
https://github.com/maxking/docker-mailman/issues/382
вт, 9 июн. 2020 г., 20:49 Mark Sapiro <mark@msapiro.net>:
On 6/9/20 10:31 AM, Danil Smirnov wrote:
On Tue, 9 Jun 2020 at 20:23, Mark Sapiro <mark@msapiro.net> wrote:
COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
These two are commented out.
Then compress shouldn't be trying to do anything. I can't explain what's going on.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
On Thu, Jun 25, 2020, at 8:59 AM, Danil Smirnov wrote:
The issue has confirmed by other users:
The issue seems to happen because the static files that are present at the default staticfile locations aren't valid anymore and aren't removed automatically on upgrades.
You can run:
sudo rm -rf /opt/mailman/web/static
To remove them manually and then it should be re-created properly on the next start. I'll try to work on a fix for this in some automated fashion.
вт, 9 июн. 2020 г., 20:49 Mark Sapiro <mark@msapiro.net>:
On 6/9/20 10:31 AM, Danil Smirnov wrote:
On Tue, 9 Jun 2020 at 20:23, Mark Sapiro <mark@msapiro.net> wrote:
COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
These two are commented out.
Then compress shouldn't be trying to do anything. I can't explain what's going on.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
On Thu, Jun 25, 2020, at 10:35 PM, Abhilash Raj wrote:
On Thu, Jun 25, 2020, at 8:59 AM, Danil Smirnov wrote:
The issue has confirmed by other users:
The issue seems to happen because the static files that are present at the default staticfile locations aren't valid anymore and aren't removed automatically on upgrades.
You can run:
sudo rm -rf /opt/mailman/web/static
To remove them manually and then it should be re-created properly on the next start. I'll try to work on a fix for this in some automated fashion.
Seems like I wasn't using the right options like Mark pointed out above.
--clear flag will automatically remove the old files.
I have created a PR1 to fix it and will try to get it out with a new release soon.
вт, 9 июн. 2020 г., 20:49 Mark Sapiro <mark@msapiro.net>:
On 6/9/20 10:31 AM, Danil Smirnov wrote:
On Tue, 9 Jun 2020 at 20:23, Mark Sapiro <mark@msapiro.net> wrote:
COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
These two are commented out.
Then compress shouldn't be trying to do anything. I can't explain what's going on.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
Hi all --
I'm stuck on this "compress" issue after upgrading and not sure how to remedy? After upgrading the Mailman components (core, postorius, hyperkitty) on my test server to the latest available in my venv I ran the following:
$ ./bin/django-admin collectstatic --clear --noinput --verbosity 0
and then
$ ./bin/django-admin compress --trace Compressing... Traceback (most recent call last): File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py", line 282, in precompile mod = import_module(mod_name) File "/opt/mailman/mm/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'sass -t compressed {infile} {outfile}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/management/commands/compress.py", line 232, in compress result = parser.render_node(template, context, node) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/offline/django.py", line 117, in render_node return node.render(context, forced=True) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 143, in render return self.render_compressed(context, self.kind, self.mode, forced=forced) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 119, in render_compressed rendered_output = compressor.output(mode, forced=forced, basename=file_basename) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/css.py", line 46, in output ret.append(subnode.output(*args, **kwargs)) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/css.py", line 48, in output return super(CssCompressor, self).output(*args, **kwargs) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py", line 314, in output output = '\n'.join(self.filter_input(forced)) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py", line 254, in filter_input for hunk in self.hunks(forced): File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py", line 228, in hunks precompiled, value = self.precompile(value, **options) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py", line 287, in precompile return True, filter.input(**kwargs) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/filters/base.py", line 239, in input return super(CachedCompilerFilter, self).input(**kwargs) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/filters/base.py", line 206, in input raise FilterError(err) compressor.exceptions.FilterError: Error: Invalid CSS after "...lor}: #{$value}": expected "{", was ";" on line 4 of /opt/mailman/mm/venv/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets/_root.scss from line 11 of /opt/mailman/mm/venv/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets/bootstrap.scss from line 4 of /opt/mailman/mm/venv/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/sass/hyperkitty.scss Use --trace for backtrace.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/mailman/mm/venv/bin/django-admin", line 8, in <module> sys.exit(execute_from_command_line()) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, **cmd_options) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(*args, **options) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/management/commands/compress.py", line 277, in handle self.handle_inner(**options) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/management/commands/compress.py", line 300, in handle_inner offline_manifest, block_count, results = self.compress(engine, extensions, verbosity, follow_links, log) File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/management/commands/compress.py", line 235, in compress "%s" % (template.template_name, smart_text(e))) django.core.management.base.CommandError: An error occurred during rendering /opt/mailman/mm/venv/lib/python3.6/site-packages/django_mailman3/templates/socialaccount/connections.html: Error: Invalid CSS after "...lor}: #{$value}": expected "{", was ";" on line 4 of /opt/mailman/mm/venv/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets/_root.scss from line 11 of /opt/mailman/mm/venv/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets/bootstrap.scss from line 4 of /opt/mailman/mm/venv/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/sass/hyperkitty.scss Use --trace for backtrace.
Any suggestions? The fixes described in this thread don't seem to be working for my case?
On 9/11/20 7:30 AM, brylon@oit.rutgers.edu wrote:
$ ./bin/django-admin compress --trace Compressing... Traceback (most recent call last): File "/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py", line 282, in precompile mod = import_module(mod_name) File "/opt/mailman/mm/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'sass -t compressed {infile} {outfile}'
You have something like
COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sass -t compressed {infile} {outfile}'), ('text/x-sass', 'sass -t compressed {infile} {outfile}'), )
in your Django settings. You either need to install ruby-sass or install sassc if it isn't already installed and for sassc change the above to
COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'), )
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I already have ruby-sass installed and the compress command used to work as expected prior to my upgrading to the latest core, postorius, hyperkitty versions using pip in my venv.
Does It matter at all when performing the Django-admin commands whether I've activated the venv or not? I think I've tried running them both activated and deactivated to no avail, but any other suggestions?
On 9/11/20 8:19 PM, brylon@oit.rutgers.edu wrote:
I already have ruby-sass installed and the compress command used to work as expected prior to my upgrading to the latest core, postorius, hyperkitty versions using pip in my venv.
Does It matter at all when performing the Django-admin commands whether I've activated the venv or not? I think I've tried running them both activated and deactivated to no avail, but any other suggestions?
I don't think that's the issue here, but the venv should be active when you run the Django-admin commands.
Looking more closely at the error, I see it says
File
"/opt/mailman/mm/venv/lib/python3.6/site-packages/compressor/base.py",
line 282, in precompile
mod = import_module(mod_name)
...
ModuleNotFoundError: No module named 'sass -t compressed {infile} {outfile}'
Thus it appears that compressor is trying to import 'sass -t compressed {infile} {outfile}' as a module instead of executing it as a command.
What version of compressor is this?
It is working for me on 4 sites with django_compressor-2.4, django_compressor-2.3 and django_compressor-2.2.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 9/12/20 12:26 PM, brylon@oit.rutgers.edu wrote:
$ pip show django-compressor Name: django-compressor Version: 2.4 <snip>
It works for me with django-compressor 2.4.
What exactly do you have for COMPRESS_PRECOMPILERS IN YOUR Django settings?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
$ grep -i compress settings_local.py 'compressor', COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sass -t compressed {infile} {outfile}'), ('text/x-sass', 'sass -t compressed {infile} {outfile}'), COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
$ rpm -q rubygem-sass rubygem-sass-3.4.19-2.el7.noarch
On 9/12/20 3:00 PM, brylon@oit.rutgers.edu wrote:
$ grep -i compress settings_local.py 'compressor', COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sass -t compressed {infile} {outfile}'), ('text/x-sass', 'sass -t compressed {infile} {outfile}'), COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
For some reason, django_compress is interpreting your 'sass -t compressed {infile} {outfile}' and 'sass -t compressed {infile} {outfile}' strings as filters rather than commands. I don't know why this would be.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
So the issue was resolved for me by installing sassc (and libsass) via yum and abandoning rubygem-sass (thereby also updating COMPRESS_PRECOMPILERS to use 'sassc'). From what I debugged, the import module error is misleading in that the compressor code was trying to exec the 'sass' command but failing; if I try exec'ing the exact command the compressor attempts i.e., /bin/sass (from rubygem-sass) it fails with:
$ sass -t compressed /opt/mailman/mm-take2/venv-take2/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/sass/hyperkitty.scss /tmp/tmpatncz9d9.css Error: Invalid CSS after "...lor}: #{$value}": expected "{", was ";" on line 4 of /opt/mailman/mm-take2/venv-take2/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets/_root.scss from line 11 of /opt/mailman/mm-take2/venv-take2/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/libs/bootstrap/stylesheets/bootstrap.scss from line 4 of /opt/mailman/mm-take2/venv-take2/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/sass/hyperkitty.scss Use --trace for backtrace. $ echo $? 65
However, using sassc it works (from the command line and when re-running django-admin compress):
$ sassc -t compressed /opt/mailman/mm-take2/venv-take2/lib/python3.6/site-packages/hyperkitty/static/hyperkitty/sass/hyperkitty.scss /tmp/tmpatncz9d9.css $ echo $? 0
On 9/25/20 2:00 PM, brylon@oit.rutgers.edu wrote:
So the issue was resolved for me by installing sassc (and libsass) via yum and abandoning rubygem-sass (thereby also updating COMPRESS_PRECOMPILERS to use 'sassc').
I had forgotten that I had seen this myself. I have now filed <https://gitlab.com/mailman/hyperkitty/-/issues/319> for this issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (5)
-
Abhilash Raj
-
Brian Carpenter
-
brylon@oit.rutgers.edu
-
Danil Smirnov
-
Mark Sapiro