Seite 1 von 1

opsi-newprod ERROR OPSI 4

Verfasst: 13 Okt 2010, 16:03
von Pikolin20
Hello,

recently i found, i think its a bug when make a new package.

Error Returned:

ERROR: 'ascii' codec can´t decode byte 0xc3 in position 2: ordinal not in range(128).

SOLUTION:

in /var/lib/python-support/python2.5/OPSI/Util/File/__init__.py change the line 351 like this:

self._lines.append(u' -- %s <%s> %s' % (entry['maintainerName'], entry['maintainerEmail'], time.strftime('%d %b %Y %H:%M:%S +0000', entry['date'])))

CAUSE

In the original __init__.py the function time.strftime its time.strftime('%a, %d %b %Y %H:%M:%S +0000', entry['date']), the problem its in %a this directive its abbreviated weekday name, and i am using DEBIAN 5 in spanish language, this means thar when i make command date in shell this return for example:

mié oct 13 16:00:57 CEST 2010, the problem its the é that in ascii its 130, and 130 its over 128 accepted characters.

Maybe in other languages similar errors and normally the problem its the ascii characters. Maybe in this cases its necessary to check the OS languages before append lines.

Re: opsi-newprod ERROR OPSI 4

Verfasst: 21 Okt 2010, 14:20
von wolfbardo
thanks. should be fixed now in our repository.

regards

Bardo Wolf