On 18/9/21 15:17, Stephen J. Turnbull wrote:
Guillermo Hernandez (Oldno7) via Mailman-users writes:
import mm_cfg
This should result in an error, there is no mm_cfg.py in Mailman3. Was there previously a Mailman 2 installation on this host? Yes, indeed. I'm trying to convert a mailman2 script to its equivalent in mailman3.
mailman withlist -r moderar -llist_to_use@mydomain.com address@moderate.com
The system returns:
Traceback (most recent call last): ModuleNotFoundError: No module named 'moderar'
I've done a
ln -s? /usr/local/mailman3/moderar.py /usr/local/lib/python3.7/site-packages/mailman/bin/moderar.py
Note that "--detail" when gives an example for "-r", it says "listaddr.py" is installed in "the Mailman installation directory", which is either /usr/local/lib/python3.7/site-packages/mailman or /usr/local/mailman3, or maybe something under /usr/local/mailman3/var, I think.
I've placed moderar.py via ln -s in all those paths. Same results
If neither of those works, Mark or Abhilash will explain soon. In the meantime you could also try "mailman.bin.moderar" instead of "moderar".
Tried, but same results. Tomorrow will be another day.
Thaks a lot for your hints.
I don't think mailman/bin is on Python's sys.path for imports (it's set up as a package with __init__.py), and the qualified path is what is used in the scripts you invoke from from the OS shell like "mailman".
Mailman-users mailing list --mailman-users@mailman3.org To unsubscribe send an email tomailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/