Menu

import clr

2016-09-09
2016-09-09
  • Milos Dobes

    Milos Dobes - 2016-09-09

    I wanted to try scripts. I copied a first sample script from help and run it. I got the error on the firs line:

    Error running script: File "", line 1
    import clr
    ^
    SyntaxError: invalid syntax

    What is my fault? Anything I write in the first line reports invalid syntax error.

     
  • Gustavo León

    Gustavo León - 2016-09-09

    Hi Milos,

    are you copy and pasting from another script file?

     
  • Milos Dobes

    Milos Dobes - 2016-09-09

    Hi,
    if I write only 2 lines (import clr, import DWSIM) and run it, I got the error:

    Error running script: Traceback (most recent call last):
    File "<string>", line 1, in <module>
    ImportError: No module named CLR</module></string>

    Now I found that all lines of copied example begin with space. It seems that after the removal of spaces example works. Is a space at the beginning of the line fault?

     

    Last edit: Milos Dobes 2016-09-09
  • Gustavo León

    Gustavo León - 2016-09-09

    Hi Milos,

    yeah It could be that extra space fault at the beginning.