On 3/8/19 11:35 AM, NAYAN KHANNA wrote:
> I apologize for the last message being sent incomplete.
> 
> Mark, I just checked all of the above files.
> All of them have contents as expected. I meant that I am not able to
> correctly recognize the syntax of `mailman inject` .
> I tried using mailman inject -q digest TEXT
> mailman inject -q TEXT
> mailman inject -q --digest TEXT
> None of these worked.
> Please help me with the correct syntax to use this.


See my prior reply, but that is incorrect because I left off the
LISTSPEC argument

Assuming TEXT is a file name, you need to precede it with -f. To inject
to incoming

mailman inject -f TEXT list.example.com

To inject to digest, you'd use

mailman inject -q digest -f TEXT list.example.com

except that wouldn't work because the digest runner expects an empty
message and things in the metadata pointing to a digest mailbox file.


> Also, I got the Hyperkitty procedure to send messages. My bad! I was on
> an admin user and the test examples created were the ones causing the issue.
> But still I didn't succeed in starting a new thread through Hyperkitty
> UI. Once I click on the Send Button, I again get that KeyError named
> 'file' which most of us faced while basic setup of mailman parts.

And that is not the issue in those cases. The KeyError is thrown in the
Django process that is trying to report the original error.


> This being the traceback:
> Environment:
...
> Traceback:
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/venv3/lib/python3.6/site-packages/Django-2.1.7-py3.6.egg/django/core/handlers/exception.py"
> in inner
>   34.             response = get_response(request)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/venv3/lib/python3.6/site-packages/Django-2.1.7-py3.6.egg/django/core/handlers/base.py"
> in _get_response
>   126.                 response =
> self.process_exception_by_middleware(e, request)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/venv3/lib/python3.6/site-packages/Django-2.1.7-py3.6.egg/django/core/handlers/base.py"
> in _get_response
>   124.                 response = wrapped_callback(request,
> *callback_args, **callback_kwargs)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/venv3/lib/python3.6/site-packages/Django-2.1.7-py3.6.egg/django/contrib/auth/decorators.py"
> in _wrapped_view
>   21.                 return view_func(request, *args, **kwargs)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/hyperkitty/hyperkitty/lib/view_helpers.py"
> in inner
>   134.         return func(request, *args, **kwargs)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/hyperkitty/hyperkitty/views/message.py"
> in new_message
>   216.                              form.cleaned_data["message"], headers)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/hyperkitty/hyperkitty/lib/posting.py"
> in post_to_list
>   84.             mlist.list_id, request.user, sender, display_name)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/hyperkitty/hyperkitty/lib/mailman.py"
> in subscribe
>   44.     rest_list = client.get_list(list_id)
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/mailmanclient/src/mailmanclient/client.py"
> in get_list
>   347.             'lists/{0}'.format(fqdn_listname))
> 
> File
> "/home/nayankhanna/Code/GSoC19/mailman/mailmanclient/src/mailmanclient/restbase/connection.py"
> in call
>   102.                                 response.content, response, None)
> 
> During handling of the above exception (HTTP Error 404: b'404 Not
> Found'), another exception occurred:


The above is the underlying issue. This code in
mailmanclient/restbase/connection.py

        try:
            response = request(
                url=url,
                auth=self.auth,
                method=method,
                data=data_str,
                headers=headers)
            # content = response.content
            # If we did not get a 2xx status code, make this look like a
            # urllib2 exception, for backward compatibility.
            if response.status_code // 100 != 2:
                raise HTTPError(url, response.status_code,
                                response.content, response, None)

has received a '404' and is raising HTTPError. When you are looking at
all this as presented to you by Django, I think there is a way to see
the arguments to the various calls in the traceback, but the argument to
call() is a path which is concatenated with 'baseurl' This is
convoluted, but baseurl comes from MAILMAN_REST_API_URL in your settings.

The bottom line is connection to the contents of MAILMAN_REST_API_URL
concatenated with /3.0/ concatenated with lists/ and the fqdn_listname
is returning a 404.

Is the HyperKitty list you are trying to post to known to Mailman core?

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
_______________________________________________
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@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

Reply via email to