How to debug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SAJ1234
    New Member
    • Feb 2008
    • 4

    How to debug

    Hi,

    I have a script as shown below

    print 'start code'
    res = MDM.send('AT+CM GF=1\r',0)
    MDM.send('AT+CM GL="REC UNREAD"\r',0)
    msg = MDM.recieve(10)
    print msg

    when i run this i get a msg as shown below

    Traceback (innermost last):
    File "C:\saj\GPS telit\athiq codes\sms.py", line 10, in ?
    AttributeError: recieve
    # clear __builtin__._
    # clear sys.path
    # clear sys.argv
    # clear sys.ps1
    # clear sys.ps2
    # clear sys.exitfunc
    # clear sys.exc_type
    # clear

    How do i debug this.
  • jlm699
    Contributor
    • Jul 2007
    • 314

    #2
    Originally posted by SAJ1234
    print 'start code'
    res = MDM.send('AT+CM GF=1\r',0)
    MDM.send('AT+CM GL="REC UNREAD"\r',0)
    msg = MDM.recieve(10)
    print msg


    Traceback (innermost last):
    File "C:\saj\GPS telit\athiq codes\sms.py", line 10, in ?
    AttributeError: recieve
    # clear __builtin__._
    # clear sys.path
    # clear sys.argv
    # clear sys.ps1
    # clear sys.ps2
    # clear sys.exitfunc
    # clear sys.exc_type
    # clear
    Is that the only code you have? Where is MDM defined? Basically this error is telling you that MDM.receive() is not defined... Not quite sure what you're trying to do here either....
    Actually on a second look..... recieve is a typo. should be receive (Remember, i before e __except__ after c and 'ay' as in neighbor and weigh!)

    A bit more information would be helpful

    Comment

    • SAJ1234
      New Member
      • Feb 2008
      • 4

      #3
      Originally posted by jlm699
      Is that the only code you have? Where is MDM defined? Basically this error is telling you that MDM.receive() is not defined... Not quite sure what you're trying to do here either....
      Actually on a second look..... recieve is a typo. should be receive (Remember, i before e __except__ after c and 'ay' as in neighbor and weigh!)

      A bit more information would be helpful
      Hi jlm699:

      Thank you for pointing out my typo error. When i changed the receive it worked. Some times its hard if you are sitting alone and doing things.

      Well in this script I am trying to just read all the response of At+cmgl and store it on a string.

      Thanks once again.

      Comment

      Working...