How to recreate Issue #973 in mailman-core
![](https://secure.gravatar.com/avatar/7ab525f8630af8194da1f157aeb96681.jpg?s=120&d=mm&r=g)
Greetings everyone, I am new to the repository of Mailman and was looking for open source projects that used Django and came across this amazing open source. I hope to learn a lot about Django and Linux.
I have started a development environment and am starting to read the documentation. I picked up issue #973 because it seemed like a easy issue to fix.
Link to Issue: https://gitlab.com/mailman/mailman/-/issues/973
- I am unable to recreate the problem. As I can't find the API url and how do I access them in my development environment. I tried the using the command "mailman shell" which is referred to in the documentation for debugging. and after holding a message and handling it. I get the following error:
handle_message(mlist, 1, Action.discard) handle_message(mlist, 1, Action.discard) Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/suyashsingh/Desktop/mailman/mailman/src/mailman/app/moderator.py", line 113, in handle_message key, msgdata = requestdb.get_request(id) TypeError: cannot unpack non-iterable NoneType object
- How can I start http://localhost:9001/ on my local machine as currently its not working. What is the port 9001 used for?
![](https://secure.gravatar.com/avatar/8da339f04438d3fcc438e898cfe73c47.jpg?s=120&d=mm&r=g)
Suyash Singh writes:
Welcome, Suyash!
Sorry this mail has been sitting in my drafts for a day or so, but I don't think anybody else has answered yet. Let me just send it and start the conversation.
I have started a development environment and am starting to read the documentation. I picked up issue #973 because it seemed like a easy issue to fix.
Not clear what you're reading. The dev setup guide starts here, but the site structure is somewhat complicated (disorganized): https://docs.mailman3.org/en/latest/devsetup.html
Link to Issue: https://gitlab.com/mailman/mailman/-/issues/973
Note that at least one other developer (whose handle I don't recognize so probably new) is working on that issue.
- I am unable to recreate the problem. As I can't find the API url and how do I access them in my development environment. I tried the using the command "mailman shell" which is referred to in the documentation for debugging. and after holding a message and handling it. I get the following error:
handle_message(mlist, 1, Action.discard) handle_message(mlist, 1, Action.discard) Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/suyashsingh/Desktop/mailman/mailman/src/mailman/app/moderator.py", line 113, in handle_message key, msgdata = requestdb.get_request(id) TypeError: cannot unpack non-iterable NoneType object
I think you probably don't have Mailman running, but I can't be sure because of the limited information you've given about how you set up your dev environment.
- How can I start http://localhost:9001/ on my local machine as currently its not working. What is the port 9001 used for?
In a dev environment, port 9001 is used for the REST API served by Mailman core. You start Mailman by running "mailman start" in the directory where you want Mailman's database stored (this assumes you have configured your dev environment to use sqlite3 as the backend).
Steve
![](https://secure.gravatar.com/avatar/8c8c6e35ec7ca5c708a6049152b2bedd.jpg?s=120&d=mm&r=g)
On Feb 5, 2022, at 5:51 AM, Stephen J. Turnbull <stephenjturnbull@gmail.com> wrote:
Suyash Singh writes:
Welcome, Suyash!
Sorry this mail has been sitting in my drafts for a day or so, but I don't think anybody else has answered yet. Let me just send it and start the conversation.
I have started a development environment and am starting to read the documentation. I picked up issue #973 because it seemed like a easy issue to fix.
Not clear what you're reading. The dev setup guide starts here, but the site structure is somewhat complicated (disorganized): https://docs.mailman3.org/en/latest/devsetup.html
Link to Issue: https://gitlab.com/mailman/mailman/-/issues/973
Note that at least one other developer (whose handle I don't recognize so probably new) is working on that issue.
- I am unable to recreate the problem. As I can't find the API url and how do I access them in my development environment. I tried the using the command "mailman shell" which is referred to in the documentation for debugging. and after holding a message and handling it. I get the following error:
handle_message(mlist, 1, Action.discard) handle_message(mlist, 1, Action.discard) Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/suyashsingh/Desktop/mailman/mailman/src/mailman/app/moderator.py", line 113, in handle_message key, msgdata = requestdb.get_request(id) TypeError: cannot unpack non-iterable NoneType object
I think you probably don't have Mailman running, but I can't be sure because of the limited information you've given about how you set up your dev environment.
- How can I start http://localhost:9001/ on my local machine as currently its not working. What is the port 9001 used for?
In a dev environment, port 9001 is used for the REST API served by Mailman core. You start Mailman by running "mailman start" in the directory where you want Mailman's database stored (this assumes you have configured your dev environment to use sqlite3 as the backend).
A minor clarification for this, Port 9001 is only used in our testing since we don’t want to start a test server on 8001, which is the default port and also the port using for dev.
Although, this does make me think that we should consider making a chage to our docs to suite more as docs and less as just tests. It would interfere with a dev server running when you run tests, which isn’t ideal though.
We have pages that have documented this kind of behavior about 9001/8001 I think, but I am sure this has to be told at least once to folks new to Mailman documentation.
I wonder if we can do something about it?
At some point though, I want to get rid of call_api() towards requests.get()
or simple urllib3.urlopen() methods as it will be a lot easier for folks to
understand and run for folks and maybe equally testable.
-- thanks, Abhilash Raj (maxking)
participants (3)
-
Abhilash Raj
-
Stephen J. Turnbull
-
Suyash Singh