demisjohn / pyFIMM

Python Interface to PhotonDesign's FimmWave/FimmProp software.
15 stars 4 forks source link

Fimmwave nodename returns Int instead of String #48

Closed demisjohn closed 8 years ago

demisjohn commented 8 years ago
(most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyfimm\__pyfimm.py", line 424, in buildNode
    SNnames.append(  fimm.Exec(r"app.subnodes["+str(i+1)+"].nodename").strip()[:-2]  )   
AttributeError: 'float' object has no attribute 'strip'

typecast fimmwave output to string if a name is expected? Should have done:

SNnames.append(  str(  fimm.Exec(r"app.subnodes["+str(i+1)+"].nodename").strip()[:-2]  )  )
demisjohn commented 8 years ago

Actually typecasting doesn't work, since it adds a decimal point to the name. 123 --> 123.0 Only an issue if the user names a node a number, eg. Dev name = 1 Bug in pdPythonLib, will return a float instead of string.

demisjohn commented 8 years ago

pdPythonLib bug - will rely on user to not use numerical names for nodes!