Ankündigung

Einklappen
Keine Ankündigung bisher.

IMAP: problem parsing message

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

  • callidomus
    antwortet
    Hi Marian,

    wer generiert eigentlich die Mail? Kannst Du mir evtl. eine schicken?

    Bis bald

    Marcus

    Einen Kommentar schreiben:


  • marian
    antwortet
    gemacht, Zeile entfernt unter:
    /usr/smarthome/plugins/mail/__init__.py

    gestartet mit -d und zwischen drin:

    Code:
    2013-12-10 21:15:18,462 ERROR    IMAP         Method IMAP exception: global name 'subject' is not defined -- scheduler.py:_task:348
    Traceback (most recent call last):
      File "/usr/smarthome/lib/scheduler.py", line 344, in _task
        obj()
      File "/usr/smarthome/plugins/mail/__init__.py", line 93, in _cycle
        if subject in self._mail_sub:
    NameError: global name 'subject' is not defined

    Einen Kommentar schreiben:


  • callidomus
    antwortet
    Hi,

    Lösch mal im Mail Plugin die Zeile, und berichte ob es dann klappt.

    subject = sub.decode()

    Ansonsten schau ich mir das nächste Woche mal an.

    Bis bald

    Marcus



    Gesendet von unterwegs

    Einen Kommentar schreiben:


  • macflei
    antwortet
    Ich glaub irgendwo im Forum gabs dazu mal was.
    Ich gehe mal davon aus das Deine plugin.conf stimmt.

    Anbei mal ein Beispiel wie ich mir in der VISU anzeigen lasse, wenn eine Nachricht auf dem AB ist. (FB sendet dann eine Mail)

    /usr/smarthome/etc/logic.conf
    Code:
    # logic.conf
    [inmail]
        filename = inmail.py
        mail_to = fritz.box@xxxxxxxx.de
    /usr/smarthome/logics/inmail.py
    Code:
    #!/usr/bin/env python
    sh.FritzBOX.mailAB(True)
    in der html:
    Code:
    {{ basic.symbol('FritzBoxAB', 'FritzBOX.mailAB', '', 'icons/rt/phone_answersing.png', 1) }}
    Angehängte Dateien

    Einen Kommentar schreiben:


  • marian
    antwortet
    Keiner eine Idee?

    Einen Kommentar schreiben:


  • marian
    hat ein Thema erstellt IMAP: problem parsing message.

    IMAP: problem parsing message

    Moin, ich taste mich gerade an die Funktionen in Smarthome-py heran.
    Emails senden geht super. Nun möchte ich mit Emails eine Logik triggeren.

    Aber... diese Meldung bekomme ich beim Debug:
    Code:
    2013-11-27 19:40:02,641 ERROR    IMAP         IMAP: problem parsing message b'1': 'str' object has no attribute 'decode' -- __init__.py:_cycle:91
    Traceback (most recent call last):
      File "/usr/smarthome/plugins/mail/__init__.py", line 89, in _cycle
        subject = sub.decode()
    AttributeError: 'str' object has no attribute 'decode'
    logic.conf:
    Code:
    [send_status]
        filename = email.py
        mail_subject = Status
    plugin.conf
    Code:
    [mail]
        class_name = SMTP
        class_path = plugins.mail
        host = smtp.***
        mail_from = meldung@***
        # ssl = True
        username = ***
        password = ***
    
    [imap]
        class_name = IMAP
        class_path = plugins.mail
        host = imap.****.eu
        username = ****
        password = ****
        # ssl = False
        port = 143
        cycle = 30
    Jemand eine Idee?

    Gruß Marian
Lädt...
X