Bug#982245: reportbug crashes during initial configuration

2021-02-07 Thread Nis Martensen
On 07.02.2021 19.46, Mikael Petersson wrote:
> Nope. No non-ascii characters for my user account entry in /etc/passwd.
> No non-ascii characters whatsoever as far as I can see. No e-mail
> address is specified in my user account entry.
> 
> Neither /etc/email-adresses nor /etc/email-addresses exist on my system.
> I don't have any MTA installed.

Thank you for checking.

> One thing that may stand out a bit in my /etc/passwd entry is my choice
> of default shell. I run fish, /usr/bin/fish. But I got the same error
> after changing to /bin/bash, running reportbug from a new login session

The shell should not matter.

The relevant code is here:
https://sources.debian.org/src/reportbug/7.9.0/reportbug/utils.py/#L301

With the information you have provided, line 308 must have been reached
without the bad 'ä' having been introduced into the emailaddr variable
yet. This leaves only /etc/mailname and socket.getfqdn() as remaining
possibilities?



Bug#982245: reportbug crashes during initial configuration

2021-02-07 Thread Nis Martensen
(Please keep the bug in cc.)

On 07.02.2021 19.01, Mikael Petersson wrote:
> Den sön 7 feb. 2021 kl 18:49 skrev Nis Martensen
> Even if you did not type such a non-ascii address into reportbug, it may
> have picked it up from any of the REPORTBUGEMAIL, DEBEMAIL, or EMAIL
> environment variables, leading to the crash. Were any of these variables
> defined on your system when you invoked reportbug?
> 
> 
> No, none of these environment variables are defined.
> 
> And note that I didn't try to enter any e-mail address at all. I only
> selected that reportbug will have direct Internet access. The crash came
> directly after I answered this question.

The crash happened when reportbug tried to guess the email address
before asking you to confirm/enter it.

If none of these variables were set, do you have any non-ascii
characters in your /etc/passwd entry or in a corresponding entry in
/etc/email-adresses?



Bug#982245: reportbug crashes during initial configuration

2021-02-07 Thread Nis Martensen
control: forcemerge 969209 982245

On 07.02.2021 17.14, Mikael Petersson wrote:
> 
> Reportbug fails during the initial configuration when I use the default
> Y answer (I press Enter) for direct Internet access. Console output
> during execution:
> [...]
> UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in
> position 23: ordinal not in range(128)

Thanks Mikael for the report. Unfortunately reportbug does not support
non-ascii characters in email addresses yet. I'm merging this report
with the existing bug. There is no problem with such characters in the
name, only in the email address.

Even if you did not type such a non-ascii address into reportbug, it may
have picked it up from any of the REPORTBUGEMAIL, DEBEMAIL, or EMAIL
environment variables, leading to the crash. Were any of these variables
defined on your system when you invoked reportbug?



Bug#982245: reportbug crashes during initial configuration

2021-02-07 Thread Mikael Petersson
Den sön 7 feb. 2021 kl 20:09 skrev Nis Martensen :

> On 07.02.2021 19.46, Mikael Petersson wrote:
> > Nope. No non-ascii characters for my user account entry in /etc/passwd.
> > No non-ascii characters whatsoever as far as I can see. No e-mail
> > address is specified in my user account entry.
> >
> > Neither /etc/email-adresses nor /etc/email-addresses exist on my system.
> > I don't have any MTA installed.
>
> Thank you for checking.
>
> > One thing that may stand out a bit in my /etc/passwd entry is my choice
> > of default shell. I run fish, /usr/bin/fish. But I got the same error
> > after changing to /bin/bash, running reportbug from a new login session
>
> The shell should not matter.
>
> The relevant code is here:
> https://sources.debian.org/src/reportbug/7.9.0/reportbug/utils.py/#L301
>
> With the information you have provided, line 308 must have been reached
> without the bad 'ä' having been introduced into the emailaddr variable
> yet. This leaves only /etc/mailname and socket.getfqdn() as remaining
> possibilities?
>

Problem solved! :-) domainname --fqdn revealed that I have actually
provided an 'ä' to the domain name. 'ä' is a common character in Swedish,
and it's certainly non-ASCII. With an ASCII-only FQDN, reportbug works fine.

Sorry for the inconvenience, and for your patience. This is most certainly
not an important bug. I wouldn't hardly recognize it as a bug at all.
FQDN:s should always be ASCII only.

/Micael


Bug#982245: reportbug crashes during initial configuration

2021-02-07 Thread Mikael Petersson
Den sön 7 feb. 2021 kl 19:16 skrev Nis Martensen :

> (Please keep the bug in cc.)
>
> On 07.02.2021 19.01, Mikael Petersson wrote:
> > Den sön 7 feb. 2021 kl 18:49 skrev Nis Martensen
> > Even if you did not type such a non-ascii address into reportbug, it
> may
> > have picked it up from any of the REPORTBUGEMAIL, DEBEMAIL, or EMAIL
> > environment variables, leading to the crash. Were any of these
> variables
> > defined on your system when you invoked reportbug?
> >
> >
> > No, none of these environment variables are defined.
> >
> > And note that I didn't try to enter any e-mail address at all. I only
> > selected that reportbug will have direct Internet access. The crash came
> > directly after I answered this question.
>
> The crash happened when reportbug tried to guess the email address
> before asking you to confirm/enter it.
>
> If none of these variables were set, do you have any non-ascii
> characters in your /etc/passwd entry or in a corresponding entry in
> /etc/email-adresses?
>

Nope. No non-ascii characters for my user account entry in /etc/passwd. No
non-ascii characters whatsoever as far as I can see. No e-mail address is
specified in my user account entry.

Neither /etc/email-adresses nor /etc/email-addresses exist on my system. I
don't have any MTA installed.

One thing that may stand out a bit in my /etc/passwd entry is my choice of
default shell. I run fish, /usr/bin/fish. But I got the same error after
changing to /bin/bash, running reportbug from a new login session

/Micael


Bug#982245: reportbug crashes during initial configuration

2021-02-07 Thread Mikael Petersson
Package: reportbug
Version: 7.9.0
Severity: important

Reportbug fails during the initial configuration when I use the default Y
answer (I press Enter) for direct Internet access. Console output during
execution:

Will reportbug often have direct Internet access? (You should answer yes to
this question unless you know what you are doing and plan to check whether
duplicate reports have been filed via some other channel.) [Y|n|q|?]?
Traceback (most recent call last):
  File "/usr/bin/reportbug", line 2361, in 
main()
  File "/usr/bin/reportbug", line 1115, in main
return iface.user_interface()
  File "/usr/bin/reportbug", line 1257, in user_interface
offer_configuration(self.options)
  File "/usr/bin/reportbug", line 572, in offer_configuration
def_realname, def_email = utils.get_email()
  File "/usr/lib/python3/dist-packages/reportbug/utils.py", line 298, in
get_email
return get_email_addr(get_user_id(emailaddr, realname))
  File "/usr/lib/python3/dist-packages/reportbug/utils.py", line 332, in
get_user_id
return email.utils.formataddr((realname, emailaddr))
  File "/usr/lib/python3.9/email/utils.py", line 91, in formataddr
address.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position
23: ordinal not in range(128)

This error makes it a bit awkward to report other bugs in Debian.

I installed the package today, so I don't know if this have worked in
earlier versions

My computer is configured for Swedish language

Kind regards,

Micael Petersson, Falun, Sweden