Using REST api to subscribe member

I have a development server that only has Mailman core installed on it. I used a virtual environment to do the installation but I did not install Postorius or Hyperkitty as I am currently working on developing a custom u.i. for Mailman 3. My programmer said the following:
"I have a problem with mailman on development server ... I was trying to add member to a list using REST api, but to no avail. After I tried all possible and impossible things, I finally looked at the logs. Error I found in log file is: IsADirectoryError: [Errno 21] Is a directory: '/opt/mailman/mm/venv/lib/python3.7/site-packages/mailman/templates' I guess mailman was looking for a template for welcome mail, and failed for some reason. I also guess this has something to do with locale or language settings I tried googling, but couldn't find anything"
The log that gave the error was /opt/mailman/mm/logs/mailman.log
My programmer tried it on another server that has both Postorius and Hyperkitty working and the api call worked, i.e. added the member to the list and sent out a welcome email. So what else do I need to install to be able to use the api to add members to a list using a non-postorius interface?
Any assistance would be appreciated.
Thanks, Brian

On March 11, 2020 5:30:46 PM GMT+00:00, brian_carpenter@emwd.com wrote:
I have a development server that only has Mailman core installed on it. I used a virtual environment to do the installation but I did not install Postorius or Hyperkitty as I am currently working on developing a custom u.i. for Mailman 3. My programmer said the following:
"I have a problem with mailman on development server ... I was trying to add member to a list using REST api, but to no avail. After I tried all possible and impossible things, I finally looked at the logs. Error I found in log file is: IsADirectoryError: [Errno 21] Is a directory: '/opt/mailman/mm/venv/lib/python3.7/site-packages/mailman/templates' I guess mailman was looking for a template for welcome mail, and failed for some reason. I also guess this has something to do with locale or language settings I tried googling, but couldn't find anything"
The log that gave the error was /opt/mailman/mm/logs/mailman.log
See https://gitlab.com/mailman/mailman/-/merge_requests/605

On 3/11/20 2:38 PM, Mark Sapiro wrote:
So how do you apply the fix? Would running the following in a virtual environment do it?
pip install --upgrade mailman

On 3/11/20 1:38 PM, Brian Carpenter wrote:
On 3/11/20 2:38 PM, Mark Sapiro wrote:
So how do you apply the fix? Would running the following in a virtual environment do it?
pip install --upgrade mailman
No, not until the next release of mailman core.

Let me first introduce myself, I'm Goran, developer whom Brian mentioned in his first message. Together with Brian, I am developing custom UI using Laravel.
Mark, thank you for pointing us in the right direction. I fixed the problem by downgrading importlib_resources to 1.0.2.
Would you suggest some other solution?
We installed mailman is using pip, do you know when will fixed version be available from pip?
Would you recommend running latest version of mailman from gitlab in production environment?
Thanks, Goran
On Wed, 11 Mar 2020 at 19:39, Mark Sapiro mark@msapiro.net wrote:
On March 11, 2020 5:30:46 PM GMT+00:00, brian_carpenter@emwd.com wrote:
I have a development server that only has Mailman core installed on it. I used a virtual environment to do the installation but I did not install Postorius or Hyperkitty as I am currently working on developing a custom u.i. for Mailman 3. My programmer said the following:
"I have a problem with mailman on development server ... I was trying to add member to a list using REST api, but to no avail. After I tried all possible and impossible things, I finally looked at the logs. Error I found in log file is: IsADirectoryError: [Errno 21] Is a directory: '/opt/mailman/mm/venv/lib/python3.7/site-packages/mailman/templates' I guess mailman was looking for a template for welcome mail, and failed for some reason. I also guess this has something to do with locale or language settings I tried googling, but couldn't find anything"
The log that gave the error was /opt/mailman/mm/logs/mailman.log
See https://gitlab.com/mailman/mailman/-/merge_requests/605
-- Mark Sapiro mark@msapiro.net Sent from my Not_an_iThing with standards compliant, open source software. _______________________________________________ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9

On 3/11/20 2:22 PM, Goran Terzic wrote:
Let me first introduce myself, I'm Goran, developer whom Brian mentioned in his first message. Together with Brian, I am developing custom UI using Laravel.
Mark, thank you for pointing us in the right direction. I fixed the problem by downgrading importlib_resources to 1.0.2.
Would you suggest some other solution?
I think that's fine for now.
We installed mailman is using pip, do you know when will fixed version be available from pip?
See reply to Brian's post.
Would you recommend running latest version of mailman from gitlab in production environment?
We do this on both mail.python.org and lists.mailman3.org as well as my own production server.

On 3/11/20 2:38 PM, Mark Sapiro wrote:
So updating Mailman core via pip did not fix the issue. We had to do the following downgrade:
pip install importlib_resources==1.0.2
When will the fix be ported to the pip repositories?

On 3/11/20 2:33 PM, Brian Carpenter wrote:
On 3/11/20 2:38 PM, Mark Sapiro wrote:
So updating Mailman core via pip did not fix the issue. We had to do the following downgrade:
pip install importlib_resources==1.0.2
When will the fix be ported to the pip repositories?
With the next release of Mailman core. This is not yet scheduled. Perhaps after PyCon in April. It is still not clear that the fix in https://gitlab.com/mailman/mailman/-/merge_requests/605 is the best way to go, but we need to do something soon as this is a serious issue.
participants (4)
-
Brian Carpenter
-
brian_carpenter@emwd.com
-
Goran Terzic
-
Mark Sapiro