ImportError: No module named _enigma

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • ImportError: No module named _enigma

      Wenn ich dieses einfache Python-Skript laufen lasse:

      Quellcode

      1. # -*- coding: utf-8 -*-
      2. from Components.config import config
      3. VDIR = config.movielist.start_videodir.value
      4. print "VDIR=", VDIR

      bekomme ich folgenden Fehler:

      Quellcode

      1. # python foo.py
      2. Traceback (most recent call last):
      3. File "foo.py", line 2, in <module>
      4. from Components.config import config
      5. File "/media/build01/vti-dorie/build/tmp/work/armv7ahf-vfp-neon-oe-linux-gnueabi/enigma2-python/enigma2-python-vti-13.0.3-20180215-r0r1/git/lib/python/Components/config.py", line 1, in <module>
      6. File "/usr/lib/enigma2/python/enigma.py", line 32, in <module>
      7. File "/usr/lib/enigma2/python/enigma.py", line 24, in swig_import_helper
      8. ImportError: No module named _enigma
      Mein PYTHONPATH ist /usr/lib/python2.7:/usr/lib/enigma2/python. Wo finde ich _enigma?
    • How I can use classes from documentation enigma2: Class List ?
      I want to write plugin for enigma2.
      For example:

      I'm opened TelNet console.
      cd /usr/lib/enigma2/src2_python (I loaded *.py files from, because in /usr/lib/enigma2/python I have only *.pyo files ) , loaded from git.opendreambox.org Git - enigma2.git/summary

      and go to python by command python


      When I import APIs.__init__

      I catch error Screenshot by Lightshot
    • Create a directory: /usr/lib/enigma2/python/Plugins/Extensions/my_plugin. You can put all files in this directory.
      The plugin needs in the directory two files:
      1. __init__.py (can be empty)
      2. plugin.py
      This is example for a plugin which is called when the timer status changes:

      Quellcode

      1. # -*- coding: utf-8 -*-
      2. from __future__ import print_function
      3. import os, sys, traceback, datetime, re
      4. import subprocess
      5. from Plugins.Plugin import PluginDescriptor
      6. from timer import TimerEntry
      7. from xml.dom import minidom
      8. from del_records import delrec
      9. def TimerChange(timer):
      10. if not (hasattr(timer, "Filename") and not timer.justplay and not timer.justremind and timer.state == TimerEntry.StateEnded):
      11. return
      12. try:
      13. print("[My_Plugin] Start ….")
      14. my_plugin()
      15. except:
      16. print("[My_Plugin] Error….")
      17. finally:
      18. print("[My_Plugin] At the end ….")
      Alles anzeigen

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von companion ()