Error in atexit._run_exitfuncs:

IMPORTANT NOTES:
 - The following errors were reported by the server:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/opt/letsencrypt/src/certbot/reporter.py", line 74, in atexit_print_messages
    self.print_messages()
  File "/opt/letsencrypt/src/certbot/reporter.py", line 117, in print_messages
    next_wrapper.fill(line) for line in lines[1:]))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 343: ordinal not in range(128)
Error in sys.exitfunc:
An unexpected error occurred:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 343: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.

Can you help me with this bug? i

Have you manually edited one of the config files ? and what command were you running ?

It looks as if you have an invalid character in your config ( hence asking if you had edited a config file )

i dont edited the config file…

i have installed letencrypt by docker

my commad running is that
certonly --webroot
–email someemail@somedomain.com --agree-tos
-d site1.com
-d subdomain1.site1.com

-d subdomain180.site1.com
–webroot-path /var/www/rootsites/htdocs

since this looks to be due to an invalid character, can you copy and paste ( use pastebin.com if you prefer ) the exact command you typed - rather than an edited version.

Alternatively, double check it all yourself to ensure there are no invalid characters in there.

can you alter the code to make some sort of escape on a non valid char?

i think it is more ease to solve since the problem will not happen with only me, it is a bug on the code.

i am lookin for this invalid char but i cant find it… all looks normal

I'm not sure why you say that "it is a bug on the code". If you search the forums here,it's only happened once before - No IDN but UnicodeEncodeError - and that was an invalid character.

What should the code do when it receives invalid data ? I guess it could give a more detailed error message that the data is invalid, but it can't just continue.

Without the detail of exactly what you did to create the error it's almost impossible to "solve the problem in the code"

Others may be able to offer something, but personally without an exact copy of what you did I can't really help more.

i am a PHP developer and i dont know how to code python, but looking for the error msg on the internet i have find this:

can yours developer test this solution?

From everything you have said - and the error - you have somehow passed it an invalid character. I've no idea what, because you won't provide that.

What do you expect a "code fix" to do ? other than stop when it reaches an invalid character ? (which it does now anyway ) so I don't see how it will enable you to obtain a valid certificate if you send it invalid data.

I'll leave it for others who may have a suggestion

Arguably the code should work harder to print something out here since it’s in an error condition already when it happens. So I think certbot should be coded more defensively here. But I agree that it is very likely mesaque has somewhere entered an invalid character.

@mesaque keep in mind that although accented characters are common in some European languages, today Let’s Encrypt will not issue certificates for names with these characters. This functionality remains on their TODO list.

I’m actually very curious about how to get this error, because it probably does have to do with requesting a domain with a non-ASCII character, but we added a bunch of code to try to check for that case and print a useful error, so it’s surprising and useful to know about if there’s a way to bypass the useful error and get this less helpful and more confusing one.

Hi @schoen i can send to you my running string for debuging the problem, but it is a production domains and i cant write then public here… do you have a e-mail? i will send to you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.