opsi-newprod ERROR OPSI 4

Antworten
Pikolin20
Beiträge: 1
Registriert: 13 Okt 2010, 15:43

opsi-newprod ERROR OPSI 4

Beitrag 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.
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1354
Registriert: 01 Jul 2008, 12:10

Re: opsi-newprod ERROR OPSI 4

Beitrag von wolfbardo »

thanks. should be fixed now in our repository.

regards

Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

Basisworkshop Mainz :

17. - 20. 06. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
Antworten