[HowTo] FileCommander im 6.3
-
- Member
- Beiträge: 722
- Registriert: 31 Jan 2017 15:27
- Hat gedankt: 26 Mal
- Hat Dank erhalten: 283 Mal
ich kriege auf OpenPLi den Fehler
File "/usr/lib/enigma2/python/Plugins/Extensions/FileCommander/addons/key_actions.py", line xxx, in do_run_script
nice = 'nice -n %d ' %nice
TypeError: %d format: a number is required, not str
hab das auf String geändert, jetzt ok
bei einigen Scripten wenn ich die im Hintergrund starte bekomme ich
File "/usr/lib/enigma2/python/Plugins/Extensions/FileCommander/addons/key_actions.py", line xxx, in check
msg_out = '\n\n' + _("script 'stout':") + '\n' + '\n'.join(task_Stout[lines:])
TypeError: slice indices must be integers or None or have an __index__ method
kann auch sein dass es nur auf OpenPLi auftritt
File "/usr/lib/enigma2/python/Plugins/Extensions/FileCommander/addons/key_actions.py", line xxx, in do_run_script
nice = 'nice -n %d ' %nice
TypeError: %d format: a number is required, not str
hab das auf String geändert, jetzt ok
Code: Alles auswählen
if nice:
nice = 'nice -n %s ' %nice
if ionice:
ionice = 'ionice -c %s ' %ionice
bei einigen Scripten wenn ich die im Hintergrund starte bekomme ich
File "/usr/lib/enigma2/python/Plugins/Extensions/FileCommander/addons/key_actions.py", line xxx, in check
msg_out = '\n\n' + _("script 'stout':") + '\n' + '\n'.join(task_Stout[lines:])
TypeError: slice indices must be integers or None or have an __index__ method
kann auch sein dass es nur auf OpenPLi auftritt
-
- Member
- Beiträge: 722
- Registriert: 31 Jan 2017 15:27
- Hat gedankt: 26 Mal
- Hat Dank erhalten: 283 Mal
@s3n0, you can Import missing .py´s locally, just copy them into Filecommander directory and then in plugin.py add
# from Components.FileTransfer import FileTransferJob, ALL_MOVIE_EXTENSIONS
from FileTransfer import FileTransferJob, ALL_MOVIE_EXTENSIONS
hopefully it works, I ported it that way to OpenPLi
# from Components.FileTransfer import FileTransferJob, ALL_MOVIE_EXTENSIONS
from FileTransfer import FileTransferJob, ALL_MOVIE_EXTENSIONS
hopefully it works, I ported it that way to OpenPLi
- s3n0
- Senior member
- Beiträge: 1655
- Registriert: 02 Jan 2017 14:38
- Wohnort: SK
- Receiver 1: Vu+ Zero 4K
- Receiver 2: Vu+ Solo SE V2
- Hat gedankt: 115 Mal
- Hat Dank erhalten: 433 Mal
- Kontaktdaten:
@mrvica:
Not. I saw the FileCommander code. Python imports the FileTransfer module from Components and then encounters a problem in OpenATV 6.2. It won't be enough to copy it locally because there will be more (dependent modules). Then the source code would have to be edited, and I don't want to do it :). I'm not even the author of the IPK package :). I don't know who is the author of the IPK package yet.
Not. I saw the FileCommander code. Python imports the FileTransfer module from Components and then encounters a problem in OpenATV 6.2. It won't be enough to copy it locally because there will be more (dependent modules). Then the source code would have to be edited, and I don't want to do it :). I'm not even the author of the IPK package :). I don't know who is the author of the IPK package yet.
-
- Member
- Beiträge: 722
- Registriert: 31 Jan 2017 15:27
- Hat gedankt: 26 Mal
- Hat Dank erhalten: 283 Mal
ich kenne mich da nicht aus, habe ein bisschen nachgegoogelt und konnte den Fehler so beheben, in dem Snapshot sieht man dass die beiden Parameter nice und ionice eingefügt wurden, ein Script dass im Vordergrund einwandfrei läuft und im Hintergrund den obigen Fehler produziert ist z.B. ref.sh, gibt auf der Console Service Reference aus
- Dateianhänge
-
- ref.sh.zip
- (400 Bytes) 23-mal heruntergeladen
-
- Member
- Beiträge: 722
- Registriert: 31 Jan 2017 15:27
- Hat gedankt: 26 Mal
- Hat Dank erhalten: 283 Mal
hab ich schon gemacht, sonst würde es gar nicht durchlaufen
genauso bei den long rot grün blau, die gibt's nicht bei OpenPLi
Code: Alles auswählen
def showMessage(self, message, messageboxtyp, timeout):
#from Screens.Standby import inStandby
#if InfoBar.instance and not inStandby:
# InfoBar.instance.openInfoBarMessage(message, messageboxtyp, timeout)
#else:
Notifications.AddNotification(MessageBox, message, type=messageboxtyp, timeout=timeout)
genauso bei den long rot grün blau, die gibt's nicht bei OpenPLi
Code: Alles auswählen
def goGreen(self):
# commented out
#if InfoBar.instance and InfoBar.instance.LongButtonPressed or self.disableActions_Timer.isActive():
# return
-
- Member
- Beiträge: 722
- Registriert: 31 Jan 2017 15:27
- Hat gedankt: 26 Mal
- Hat Dank erhalten: 283 Mal
hier nochmal der Log
Code: Alles auswählen
File "/usr/lib/enigma2/python/Components/Task.py", line 222, in processFinished
File "/usr/lib/enigma2/python/Components/Task.py", line 236, in finish
File "/usr/lib/enigma2/python/Plugins/Extensions/FileCommander/addons/key_actions.py", line 145, in check
msg_out = '\n\n' + _("script 'stout':") + '\n' + '\n'.join(task_Stout[lines:])
TypeError: slice indices must be integers or None or have an __index__ method
-
- Member
- Beiträge: 722
- Registriert: 31 Jan 2017 15:27
- Hat gedankt: 26 Mal
- Hat Dank erhalten: 283 Mal
das habe ich auskommentiert, kein blauer (grüner) mehr und danke für deine Hilfe
Code: Alles auswählen
class task_postconditions(Condition):
def check(self, task):
global task_Stout, task_Sterr
message = ''
lines = config.plugins.filecommander.script_messagelen.value*-1
msg_out = ''
#if task_Stout:
# msg_out = '\n\n' + _("script 'stout':") + '\n' + '\n'.join(task_Stout[lines:])
#if task_Sterr:
# msg_err = '\n\n' + _("script 'sterr':") + '\n' + '\n'.join(task_Sterr[lines:])
if task.returncode != 0:
messageboxtyp = MessageBox.TYPE_ERROR
msg_msg = _("Run script") + _(" ('%s') ends with error number [%d].") %(task.name, task.returncode)
else:
messageboxtyp = MessageBox.TYPE_INFO
msg_msg = _("Run script") + _(" ('%s') ends with error messages.") %task.name
#if task_Stout and (task.returncode != 0 or task_Sterr):
# message += msg_msg + msg_out
#if task_Sterr:
# if message:
# message += msg_err
# else:
# message += msg_msg + msg_err