OpenBh crash sf8008

s8un3no

Active member
Schermata verde sulla finestra script, crash log:
EN Green screen on the script window, crash log:
Code:
<  7717.0047>   File "/usr/lib/enigma2/python/Screens/BpGreen.py", line 175, in __init__
<  7717.0052>     self.populateSL()
<  7717.0052>   File "/usr/lib/enigma2/python/Screens/BpGreen.py", line 198, in populateSL
<  7717.0057>     for line in f.readlines():
<  7717.0057>   File "/usr/lib/python3.9/codecs.py", line 322, in decode
<  7717.0064>     (result, consumed) = self._buffer_decode(data, self.errors, final)
<  7717.0065> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 457: invalid start byte
ho modificato il file BpGreen.py alla riga 198 così:
EN I edited the BpGreen.py file on line 198 like this:
Code:
try:					
					for line in f.readlines():
						if line.find('#DESCRIPTION=') != -1:
							line = line.strip()
							desc = line[13:]
							
				except:
					print("[s813!] nomefile: ", fil2)
Con questa modifica ho trovato 2 file che davano errore, uno aveva una à ( a accentata), tolta quella non da più errore. Il secondo file non ho capito cosa aveva, ho tolto la prima riga #!/bin/sh l'ho riscritta, non ha più dato errore.
Altra cosa, meno importante, e che nella directory si cercano solo i file con estensione .sh ma io ne ho alcuni senza estensione, si dovrebbero cercare tutti i file eseguibili

Traslate google

With this modification I found 2 files that gave an error, one had an à (accented a), removed the one no longer gives an error. The second file I did not understand what it had, I removed the first line #! / Bin / sh I rewrote it, it no longer gave an error.
Another thing, less important, is that in the directory you are only looking for files with .sh extension but I have some without extension, you should look for all executable files
 

Logan

coder
Staff member
Administrator
The scripts you want to use in Obh must have 3 requirements
1 have to be in UTF-8 charset
2 have to include the line DESCRPTION=xxxxxxx
3 must have .sh extension
 

s8un3no

Active member
this script (Process_List.sh) crashes
Code:
#!/bin/sh
#DESCRIZIONE = Questo script vi mostrerá tutti i processi in esecuzione sulla vostra dreambox
ps
 

AlexWilMac

Staff member
Moderator
ATTENZIONE: OBH5, a differenza delle precedenti, è molto sensibile a script salvati, magari per errore, in codifiche diverse da UTF-8, caratteristica necessaria come ha giustamente scritto Logan.
Verificatelo con un comando tipo "Salva con nome", (a seconda del programma utilizzato può cambiare, ma il succo è quello), e fra le opzioni di salvataggio.

EDIT
È sufficiente che ci sia anche solo uno script non codificato UTF-8 per causare il crash richiamado gli script con VERDE/BLU!

CAREFUL! OBH5, differently from previous versions, is very sensitive to the presence, it the /usr/script/ folder of scripts whose encoding is not UTF-8. This is a MUST characteristic and be aware of the fact that pressing GREEN/BLUE to show scripts, results in a crash even when you have just one script non UTF-8.
You need to verify your scripts' encoding by a "Save as..." command and its advanced saving options.
 
Last edited:

s8un3no

Active member
Ho pensato che dipendeva dalla 'à' invece era tutto il file con coodifica non utf8, bene, buono a sapersi

Translate
I thought it depended on the 'à' instead it was the whole file with non utf8 coding, well, good to know
 

AlexWilMac

Staff member
Moderator
La "à", come tutti gli altri caratteri accentati, di per sé stessi non sono un problema: sono previsti da UTF-8. Basta che fai una prova a creare un file con i caratteri accentati, accertarti di salvarlo in UTF-8 e riaprirlo: vedrai che è tutto a posto.

The "à" or other stressed chars are not a problem: they are in UTF-8 code.
 
Top