585,948 active members*
3,817 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    1145

    SendText message on errors

    Has anyone done a send text message on error function ? I did it in M3 and M4 and UCCNC but so far Python is a mystery to me. Not a programmer.

    (;-) TP

  2. #2
    Join Date
    Oct 2005
    Posts
    1145

    Re: SendText message on errors

    Hi Guys I am working on code to send a text message from PathPilot. I am tryin gthis code but I keep getting an error I do not know how to handle. It seems that Python is extremely indent sensitive ??

    Anyone know how to fix it.

    import smtplib

    smtpObj = smtplib.SMTP('smtp.EXAMPLE.com', 587)
    smtpObj.ehlo()
    smtpObj.starttls()
    smtpObj.login('[email protected]', ' PASSWORD')
    smtpObj.sendmail('[email protected]', '[email protected]', 'Subject: Machine #29 , Broken ToolBit'){}
    smtpObj.quit()

    I get this error when I run the script in PP

    IndentationError: unexpected indent

  3. #3
    Join Date
    Oct 2005
    Posts
    1145

    Re: SendText message on errors

    OK PP can now call home (;-) Just need to figue out how to control it and use it for error messages and to send a message to a supervisor from teh controller. Type in a message and push teh CALL button.

    (;-) TP

  4. #4
    Join Date
    Nov 2012
    Posts
    591

    Re: SendText message on errors

    Yeah, in Python, indentation matters.

    Code:
    if something:
        do_thing_one()
    do_thing_two()
    versus

    Code:
    if something:
        do_thing_one()
        do_thing_two()
    mean different things!
    (Also, tabs count as one space, so if you aren't consistent in whether you use space or tab, you'll be quite confused.)

Similar Threads

  1. DMU errors
    By Eugene163 in forum Deckel, Maho, Aciera, Abene Mills
    Replies: 1
    Last Post: 11-18-2015, 01:38 PM
  2. Errors 122 and 175
    By grc in forum Haas Mills
    Replies: 0
    Last Post: 07-30-2015, 08:38 AM
  3. Errors 190 and 192
    By luisreynoso in forum Milltronics
    Replies: 1
    Last Post: 02-14-2013, 01:45 AM
  4. Need help regarding G02 and Go3 errors
    By Nicky Melitech in forum Okuma
    Replies: 6
    Last Post: 09-15-2010, 02:04 PM
  5. Getting 2 Errors.... Someone Please!!
    By DesKitchens in forum Commercial CNC Wood Routers
    Replies: 0
    Last Post: 09-14-2009, 02:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •