Hey all,
Having a strange issue trying to update my FreePBX system.
Noticed my updates having run in a while, in the UI its saying
Unable to run ‘yum check-updates’, can’t check for updates
I figured no big deal, ill just go try to run yum update manually, but I’m presenting with a strange python error that I’ve never seen before.
[root@pbx ~]# yum update
Traceback (most recent call last):
File “/usr/bin/yum”, line 4, in
import yum
File “/usr/lib/python2.7/site-packages/yum/init.py”, line 59, in
import config
File “/usr/lib/python2.7/site-packages/yum/config.py”, line 30, in
from parser import ConfigPreProcessor, varReplace
File “/usr/lib/python2.7/site-packages/yum/parser.py”, line 4, in
import urlgrabber
File “/usr/lib/python2.7/site-packages/urlgrabber/init.py”, line 55, in
from grabber import urlgrab, urlopen, urlread
File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 2291
SyntaxError: Non-ASCII character ‘\x96’ in file /usr/lib/python2.7/site-packages/urlgrabber/grabber.py on line 2291, but no encoding declared; see PEP 263 – Defining Python Source Code Encodings | peps.python.org for details
I’ve tried running yum clean all but also a python error. Not sure what’s going on, tried searching the errors and found nothing related to FreePBX… any thoughts?
EDIT: I also cant run a backup, it fails with a mysql connect error. The scheduled backups also have not been running, presumably because of whatever is causing these errors - so I’m paranoid about rebooting the system now (I do have very old backups, but its in a live environment so an up to date backup would be nice)
Hmm ok ive definitely got a different size and much older version
-rw-r–r-- 1 root root 96520 Oct 30 2018 grabber.py
If I go to line 2290 I get jibberish!
if opts.tries < retry and ug_err.errno in opts.retrycodes:
��ߊ�����Y���^Y+1x^S^R�anF Mpt���ފފ�� ģN^E�^Ehޣԓd�F^B �� ^BF��ߓ���1uu�����.]���4����[�2^T��דu� Γ^SΛF�ߛߛFu�ߌ��A�9MR^C���Ō^Vts��AK�s1�dd�F�^Bs�$
Could you post your grabber.py up to “meter.end()” and ill just try replacing, or better yet, post your whole grabber.py and ill just backup and replace my version
AHA! I was able to fix this, thanks to you pointing out about the file corruption!
Replaced the corrupt grabber.py with the latest version on github, which then present with a missing dependency for “six”.
Installed pip to install the six module and now yum update is running!
Thanks so much for your help!