-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qcleanup fails with error #115
Comments
@BigMichi1 Strange, looks like a python3.6 compat issue... I'll try to reproduce it. |
I have the same issue and from what I can tell the root cause seems to be psycopg2 using According to the psycopg2 devs, this is something they might fix in v3, but will stay as-is. |
I observe the same error with modoboa: 1.13.1 and Amavis frontend: 1.2.3 on Ubuntu 18.04.2 LTS. |
@ironage Which version of Python do you run modoboa with? IIRC psycogp2 should use Django automatically orders objects by their primary keys when deleting them and as stated above the |
@PatTheMav I'm using Python 3.6.7. |
@ironage Well, Python 3 explicitly states: This is due to
I've dug up this post/reply by a I've tried using the typecast as he suggested but first I had to adapt to my specific CFFI case (PyPy FTW) by encoding the value to a byte string (just add those lines to the import statements in
YMMV, but with PyPy 3.6 7.0.0 this works without throwing any errors now. |
@PatTheMav many thanks for that workaround! I applied the patch and it's working for me as well. I'll enable the cron job again. Probably the issue is really the fault of psycopg2 for not using a type that supports sorting by default, but I also think the memoryview should support comparison in this case. I found an open issue about it and left a comment there providing this issue as an "in the wild" argument for supporting it (https://bugs.python.org/issue20399). |
Many thanks, it's working for me too. Sorry @tonioo for duplicate. |
@PatTheMav Where did you put your fix in the code? |
@tonioo I updated
I also had to add a single
Alas I don't know which module needed this to work or if this was some compatibility fix with Django, I will have to investigate this again. But this is EDIT: It should be noted that I have modoboa with (I think) all plugins working on Pypy3 with It's not covered by the installer, but I set up my modoboa server twice now without it and.. I learned a lot from that.. 😂 |
@PatTheMav Thanks for this. I have applied the patch and I hope it will work. For the
|
@pubmania Yeah straight in there, but I'd advise leaving it for now as I can't recall what I needed that fix for and it's more or less a hack that should be avoided if necessary. My gut tells me that was a specific "hack" for |
Cheers 👍👍 I created the file so might as well leave it there if it won't harm anything or do you reckon deleting is better way to go. |
Well on second thought it has to be a workaround for pypy as psycopg2cffi is used specifically for that purpose, it doesn't really make sense to use it with CPython (as psycopg2 has more recent updates and there is no performance penalty for C modules), so that dummy file just covers modules that load/require a psycopg2 file for an import that would otherwise fail. So bottom line: If you use CPython, you only need to place this in the file if you actually use a Postgres database.
|
ah I don't know much about CPython so it is safe to assume I don't use it but I do use Postgres database. Thanks for taking the time to explain. |
CPython is the name of the reference implementation of Python, so the one you usually download from their website (and that |
lol... damn so I do use it |
Just to throw in I got this message ("TypeError: '<' not supported between instances of 'memoryview' and 'memoryview'") for the first time overnight, so the issue is still around even with fully up-to-date Modoboa installation. The box seems to still be working on through though so I haven't (yet, anyway) tried the patch above. Full Traceback (most recent call last):
|
Where I should put that? on /srv/mobodoa/instance/instance/settings.py ? |
Yep, as I mentioned in #115 (comment). |
Ok, I no longer have errors, but it is not cleaning the emails that are in quarantine |
This issue still exist on python3.7 as well.
|
It will continue to exist for as long as you use a Postgres database and Django uses
The actual fix would be for Amavis(!) to not use a composite primary key with a |
Hello there, what does the code exactly? Since this information provides the possibility to improve the code, so it will not throw errors in the future
due to: |
Hi Folk! I was out for 3 weeks. I have the same problem for 2 weeks now with last modoboa version. I have this version: /srv/modoboa/env/lib/python3.9/site-packages/psycopg2
|
the cronjob which was installed by modoboa-installer fail every night with the following error
Cronjob:
Error:
The text was updated successfully, but these errors were encountered: