After the most recent version update, I have been unable to load the System Status Checks page. Today I tried running the status_checks.py script in a shell and got the following error message from python:
ubuntu@emmons:~/mailinabox/management$ python status_checks.py
File "status_checks.py", line 418
SyntaxError: Non-ASCII character '\xe2' in file status_checks.py on line 418, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
I opened the file in my FTP client and there IS an unrecognizable character on that line. This is the line in question:
output.print_ok("Nameserver glue records are correct at registrar. [ns1/ns2.%s **↦** %s]" % (env['PRIMARY_HOSTNAME'], env['PUBLIC_IP']))
I’ve highlighted (see double * around the character) the character that isn’t recognized. Should I be reporting this elsewhere? How can this be fixed?
I opened an issue as recommended. I have run sudo mailinabox several times and now I am experiencing the exact same issue with the Custom DNS page, which is especially frustrating because I need access to it frequently for subdomains for clients. I have never had so many problems with MiaB before and if I can’t get this resolved, it could lead me to find a solution elsewhere.
For us to resolve this issue, we are going to need a lot more details. So far you have told us next to nothing, and I’m not clear you have attempted one of the solutions in the above linked SO question.
I have tried all the recommended solutions – before AND after posting this. I am running MiaB version 0.53 on an Ubuntu 18.04 Digital Ocean droplet. If you will tell me what further details you need, I will gladly provide them.
What version did you upgrade from? This way we can look at the changelog and see if anything might have caused this.
Is Ubuntu updated? If you run sudo apt update && sudo apt upgrade everything updates and doesn’t report any problems?
And the solutions at the above linked StackOverflow question did not resolve your issue? (e.g, the two provided solutions of adding # -*- coding: utf-8 -*- or # coding: utf-8 to the top of the .py file.)
Please keep in mind, MiaB is installed on over 20,000 servers right now, and few people ever report problems. So the most likely problem is something specific to your MiaB install, the server, or the server environment. We just have to find where that is.
While this is correct, the only change from .53 to .53a was to change the Z-push download URL because the old URL had stopped working. If .53 had successfully installed, then upgrading to .53a is unlikely to resolve this issue, unless there was some other issue that running an update somehow corrects, but I think sudo mailinabox would accomplish the same?
With the timing of the two issues being similar (or at least it seems - who can keep track of time anymore?) I confused which issue was corrected with a new release and which one wasn’t. Again, thanks for the heads-up.
THANK YOU to both @alento and @openletter! And thank you so much for your patience with my snippiness. It’s been a frustrating day. @alento, that fix for Custom DNS did the trick. I had, in fact, deleted a user before making sure the DNS record was actually removed and I had completely forgotten about the .yaml file. I also added the relevant line at the top of both status_checks.py and dns_update.py. Running version .53a now and all is working as it should.
Please note that I don’t know if the fix from SO to add those lines to the .py files is relevant to this issue, I was just trying to find something that is what I found, as I had not followed that previous issue which appears to match you problem, exactly and had not searched through the issues.