Ankündigung

Einklappen
Keine Ankündigung bisher.

Neues Plugin: NibeUplink

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #16
    Was auch gehen sollte. Ändere mal bitte den Import von:

    Code:
     
     from .NibeHTMLParser import NibeHTMLParser [FONT=Arial][SIZE=15px][/SIZE][/FONT]
    nach
    Code:
    import NibeHTMLParser

    Kommentar


      #17
      Meine Python-Version ist 2.7.3.
      Ich habe aber festgestellt, dass auch eine Version 3.2.3 installiert ist:
      Code:
      admin@smarthome:/usr/smarthome$ python -V
      Python 2.7.3
      admin@smarthome:/usr/smarthome$ python3 -V
      Python 3.2.3
      Den Import habe ich jetzt geändert:
      Code:
      import NibeHTMLParser
      Ergebnis:
      Code:
      admin@smarthome:/usr/smarthome$ python plugins/nibeuplink/__init__.py
      Traceback (most recent call last):
        File "plugins/nibeuplink/__init__.py", line 42, in <module>
          import NibeHTMLParser
        File "/usr/smarthome/plugins/nibeuplink/NibeHTMLParser.py", line 21, in <module>
          from html.parser import HTMLParser
      ImportError: No module named html.parser
      Aber:
      Code:
      admin@smarthome:/usr/smarthome$ python3 plugins/nibeuplink/__init__.py
      admin@smarthome:/usr/smarthome$
      Das heisst also, mit Python3 würde es wohl laufen. Nur wie bringe ich SH.py dazu Python3 zu verwenden???

      Kommentar


        #18
        Also. Ich habe leider in deinen Fehlern oben nicht auf die Python-Version geachtet. Habe bei mir Python3 am laufen und das Plugin auch dafür geschrieben.

        Schau mal bitte was
        Code:
        which python
        sagt.

        Du könntest einen symlink auf python3 machen.
        Code:
        ln -s /usr/bin/python3 /usr/bin/python
        wirkt sich aber dann systemweit aus.

        Kommentar


          #19
          Code:
          admin@smarthome:/usr/smarthome$ which python
          /usr/bin/python
          Habe jetzt mal nach python3 verlinkt:
          Code:
          admin@smarthome:/usr/smarthome$ python -V
          Python 3.2.3
          admin@smarthome:/usr/smarthome/plugins/nibeuplink$ ls -l /usr/bin/python
          lrwxrwxrwx 1 root root 7 Mar 15 11:19 /usr/bin/python -> python3
          Nach SH.py restart bekomme ich jetzt im Log:
          Code:
          2016-03-16 17:28:15,495 ERROR    Main         Plugin nibeuplink exception: No module named NibeHTMLParser -- plugin.py:__init__:57
          Traceback (most recent call last):
            File "/usr/smarthome/lib/plugin.py", line 53, in __init__
              plugin_thread = Plugin(smarthome, plugin, classname, classpath, args)
            File "/usr/smarthome/lib/plugin.py", line 79, in __init__
              exec("import {0}".format(classpath))
            File "<string>", line 1, in <module>
            File "/usr/smarthome/plugins/nibeuplink/__init__.py", line 43, in <module>
              import NibeHTMLParser
          ImportError: No module named NibeHTMLParser
          Dein Plugin mag mich nicht

          Kommentar


            #20
            Hattest du den include angepasst?

            Kommentar


              #21
              Zitat von DerSeppel Beitrag anzeigen
              Hattest du den include angepasst?
              Steht jetzt auf:
              Code:
              import NibeHTMLParser
              Wenn ich das wieder rückgängig mache bekomme ich wieder den ursprünglichen Fehler, siehe: https://knx-user-forum.de/forum/supp...595#post919595

              Kommentar


                #22
                Wenn ich am Wochenende Zeit habe, dann schau mich mal drüber und baue eine ExceptionHandling rein. Dürfte eigentlich kein Problem sein der Fehler. Bei mir steht der auch immer mal wieder im Log.

                Kommentar

                Lädt...
                X