5 Replies Latest reply: Feb 10, 2011 2:44 PM by blue50_mc RSS

Error on MDM lib

Newbie

I try to run my first script using Python and GC864-QUAD-V2 under the EVK2. I have a simple script import MDM print ('Hello World!') result = MDM.send("AT\\r", 0) print (result) c = MDM.receive(10) print (c) But this error I'm having every time I try to run the script Traceback (most recent call last):   File "C:\Program Files\Python\Examples\hello.py", line 1, in     import MDM   File "C:\Python31\lib\MDM.py", line 49     raise StandardError, 'ERROR opening the COM port.!'                       ^ SyntaxError: invalid syntax Does any one why? Im using the upper DB9 on the EVK, and on my computer I set it to COM1, I can use AT command using the Hyper Terminal. Help!

  • Re: Error on MDM lib
    Newbie

    did you specify "COM1:"? Is the port closed in hyperterminal whe you try your script?

    • Re: Error on MDM lib
      Newbie

      Yes it was chosed COM1, and thehyperterminal was closed before. Does any one has a simple script on which use the MDM lib (already tested)? O some can send me this MDM lib, just to see if my as some error?

      • Re: Error on MDM lib
        Newbie

        Hi everyone, I'm still have this MDM lib problem, I could create, download and execute simple script that use GPIO,SER and MOD libs. But at the time I try to use the MDM my script simple does not run. When I activate a script using SER and MOD lib runs as expected and this is what I have on the debug port:

        import exceptions' failed; traceback: ImportError: No module named exceptions

        Warning!  Falling back to string-based exceptions

        Python 1.5.2+ (#0, Jan 24 2008, 14:55:00) [C] on GC864-QUAD-V2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

        import SER # builtin

        import MOD # builtin

        # clear __builtin__._

        # clear sys.path

        ...

        ...

        But at the time I try to run another script that use MDM I have a similar error message but with out the bold lines and the script does not run.

        I suspect on my MDM lib, but I'm not sure since this is the one cames with the Python Package 1.5.2 ver 4.1.

        Does any one has a simple script that use the MDM lib and works for you correct? could some one toll me where can I download the MDM lib just to check if mine is corrupted or has some problem?

        Regards.

      • Re: Error on MDM lib
        Newbie

        Hi everyone, I'm still have this MDM lib problem, I could create, download and execute simple script that use GPIO,SER and MOD libs. But at the time I try to use the MDM my script simple does not run. When I activate a script using SER and MOD lib runs as expected and this is what I have on the debug port:

        import exceptions' failed; traceback: ImportError: No module named exceptions

        Warning!  Falling back to string-based exceptions

        Python 1.5.2+ (#0, Jan 24 2008, 14:55:00) [C] on GC864-QUAD-V2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

        import SER # builtin

        import MOD # builtin

        # clear __builtin__._

        # clear sys.path

        ...

        ...

        But at the time I try to run another script that use MDM I have a similar error message but with out the bold lines and the script does not run.

        I suspect on my MDM lib, but I'm not sure since this is the one cames with the Python Package 1.5.2 ver 4.1.

        Does any one has a simple script that use the MDM lib and works for you correct? could some one toll me where can I download the MDM lib just to check if mine is corrupted or has some problem?

        Regards.

        • Re: Error on MDM lib
          Newbie

          Hi everyone,

          I still have the problem. Now I try to execute the script under DOS prompt, and works my script using the MDM lib. But at the time I download this same script (*.pyo) to the module it just not show anything (just the same warning message on the ASC1) just the same message that I post it before.

          Please help me to figurate out what am i doing wrong.